mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: additional changes
This commit is contained in:
parent
2ae8dbeba5
commit
25ac82f4ad
4 changed files with 30 additions and 15 deletions
|
|
@ -10,11 +10,11 @@ import * as Form from '@radix-ui/react-form'
|
|||
import { useFormik } from 'formik'
|
||||
import { getOrgLogoMediaDirectory } from '@services/media/media'
|
||||
import React from 'react'
|
||||
import { AlertTriangle } from 'lucide-react'
|
||||
import { AlertTriangle, UserRoundPlus } from 'lucide-react'
|
||||
import { useRouter } from 'next/navigation'
|
||||
import Link from 'next/link'
|
||||
import { signIn } from "next-auth/react"
|
||||
import { getUriWithOrg } from '@services/config/config'
|
||||
import { getUriWithOrg, getUriWithoutOrg } from '@services/config/config'
|
||||
import { useLHSession } from '@components/Contexts/LHSessionContext'
|
||||
|
||||
interface LoginClientProps {
|
||||
|
|
@ -176,7 +176,13 @@ const LoginClient = (props: LoginClientProps) => {
|
|||
</Form.Submit>
|
||||
</div>
|
||||
</FormLayout>
|
||||
<div className='flex h-0.5 rounded-2xl bg-slate-100 mt-5 mb-5 mx-10'></div>
|
||||
<div className='flex h-0.5 rounded-2xl bg-slate-100 mt-5 mx-10'></div>
|
||||
<div className='flex justify-center py-5 mx-auto'>OR </div>
|
||||
<div className='flex flex-col space-y-4'>
|
||||
<Link href={{ pathname: getUriWithoutOrg('/signup'), query: props.org.slug ? { orgslug: props.org.slug } : null }} className="flex justify-center items-center py-3 text-md w-full bg-gray-800 text-gray-300 space-x-3 font-semibold text-center p-2 rounded-md shadow hover:cursor-pointer">
|
||||
<UserRoundPlus size={17} />
|
||||
<span>Sign up</span>
|
||||
</Link>
|
||||
<button onClick={() => signIn('google', { callbackUrl: '/redirect_from_auth' })} className="flex justify-center py-3 text-md w-full bg-white text-slate-600 space-x-3 font-semibold text-center p-2 rounded-md shadow hover:cursor-pointer">
|
||||
<img src="https://fonts.gstatic.com/s/i/productlogos/googleg/v6/24px.svg" alt="" />
|
||||
<span>Sign in with Google</span>
|
||||
|
|
@ -184,6 +190,7 @@ const LoginClient = (props: LoginClientProps) => {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import { AlertTriangle, Check, User } from 'lucide-react'
|
|||
import Link from 'next/link'
|
||||
import { signUpWithInviteCode } from '@services/auth/auth'
|
||||
import { useOrg } from '@components/Contexts/OrgContext'
|
||||
import { signIn } from 'next-auth/react'
|
||||
|
||||
const validate = (values: any) => {
|
||||
const errors: any = {}
|
||||
|
|
@ -92,7 +93,7 @@ function InviteOnlySignUpComponent(props: InviteOnlySignUpProps) {
|
|||
},
|
||||
})
|
||||
|
||||
useEffect(() => {}, [org])
|
||||
useEffect(() => { }, [org])
|
||||
|
||||
return (
|
||||
<div className="login-form m-auto w-72">
|
||||
|
|
@ -180,6 +181,13 @@ function InviteOnlySignUpComponent(props: InviteOnlySignUpProps) {
|
|||
</Form.Submit>
|
||||
</div>
|
||||
</FormLayout>
|
||||
<div>
|
||||
<div className='flex h-0.5 rounded-2xl bg-slate-100 mt-5 mb-5 mx-10'></div>
|
||||
<button onClick={() => signIn('google')} className="flex justify-center py-3 text-md w-full bg-white text-slate-600 space-x-3 font-semibold text-center p-2 rounded-md shadow hover:cursor-pointer">
|
||||
<img src="https://fonts.gstatic.com/s/i/productlogos/googleg/v6/24px.svg" alt="" />
|
||||
<span>Sign in with Google</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ function OpenSignUpComponent() {
|
|||
},
|
||||
})
|
||||
|
||||
useEffect(() => {}, [org])
|
||||
useEffect(() => { }, [org])
|
||||
|
||||
return (
|
||||
<div className="login-form m-auto w-72">
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export function OrgProvider({ children, orgslug }: { children: React.ReactNode,
|
|||
return (
|
||||
<InfoUI
|
||||
href={getUriWithoutOrg(`/signup?orgslug=${orgslug}`)}
|
||||
message='You are not part of this Organization'
|
||||
message='You are not part of this Organization yet'
|
||||
cta={`Join ${org?.name}`}
|
||||
/>
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue