+24





![autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>](/assets/img/avatar_default.png)
![Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>](/assets/img/avatar_default.png)


-LAN-
GitHub
Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Yunlu Wen
Joel
GareArc
NFish
Davide Delbianco
minglu7
Ponder
crazywoola
gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
heyszt
Asuka Minato
Guangdong Liu
Eric Guo
NeatGuyCoding
XlKsyt
Dhruv Gorasiya
crazywoola
github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
lyzno1
hj24
GuanMu
非法操作
Copilot
Tonlo
Yusuke Yamada
Novice
kenwoodjw
Ademílson Tonato
znn
yangzheli
9a5f214623
Signed-off-by: NeatGuyCoding <[email protected]> Signed-off-by: lyzno1 <[email protected]> Signed-off-by: kenwoodjw <[email protected]> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Yunlu Wen <[email protected]> Co-authored-by: Joel <[email protected]> Co-authored-by: GareArc <[email protected]> Co-authored-by: NFish <[email protected]> Co-authored-by: Davide Delbianco <[email protected]> Co-authored-by: minglu7 <[email protected]> Co-authored-by: Ponder <[email protected]> Co-authored-by: crazywoola <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: heyszt <[email protected]> Co-authored-by: Asuka Minato <[email protected]> Co-authored-by: Guangdong Liu <[email protected]> Co-authored-by: Eric Guo <[email protected]> Co-authored-by: NeatGuyCoding <[email protected]> Co-authored-by: XlKsyt <[email protected]> Co-authored-by: Dhruv Gorasiya <[email protected]> Co-authored-by: crazywoola <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: lyzno1 <[email protected]> Co-authored-by: hj24 <[email protected]> Co-authored-by: GuanMu <[email protected]> Co-authored-by: 非法操作 <[email protected]> Co-authored-by: Copilot <[email protected]> Co-authored-by: Tonlo <[email protected]> Co-authored-by: Yusuke Yamada <[email protected]> Co-authored-by: Novice <[email protected]> Co-authored-by: kenwoodjw <[email protected]> Co-authored-by: Ademílson Tonato <[email protected]> Co-authored-by: znn <[email protected]> Co-authored-by: yangzheli <[email protected]>
43 lines
1.6 KiB
TypeScript
43 lines
1.6 KiB
TypeScript
'use client'
|
|
import Header from '@/app/signin/_header'
|
|
|
|
import cn from '@/utils/classnames'
|
|
import { useGlobalPublicStore } from '@/context/global-public-context'
|
|
import useDocumentTitle from '@/hooks/use-document-title'
|
|
import { AppContextProvider } from '@/context/app-context'
|
|
import { useIsLogin } from '@/service/use-common'
|
|
import Loading from '@/app/components/base/loading'
|
|
|
|
export default function SignInLayout({ children }: any) {
|
|
const { systemFeatures } = useGlobalPublicStore()
|
|
useDocumentTitle('')
|
|
const { isLoading, data: loginData } = useIsLogin()
|
|
const isLoggedIn = loginData?.logged_in
|
|
|
|
if(isLoading) {
|
|
return (
|
|
<div className='flex min-h-screen w-full justify-center bg-background-default-burn'>
|
|
<Loading />
|
|
</div>
|
|
)
|
|
}
|
|
return <>
|
|
<div className={cn('flex min-h-screen w-full justify-center bg-background-default-burn p-6')}>
|
|
<div className={cn('flex w-full shrink-0 flex-col items-center rounded-2xl border border-effects-highlight bg-background-default-subtle')}>
|
|
<Header />
|
|
<div className={cn('flex w-full grow flex-col items-center justify-center px-6 md:px-[108px]')}>
|
|
<div className='flex flex-col md:w-[400px]'>
|
|
{isLoggedIn ? <AppContextProvider>
|
|
{children}
|
|
</AppContextProvider>
|
|
: children}
|
|
</div>
|
|
</div>
|
|
{systemFeatures.branding.enabled === false && <div className='system-xs-regular px-8 py-6 text-text-tertiary'>
|
|
© {new Date().getFullYear()} LangGenius, Inc. All rights reserved.
|
|
</div>}
|
|
</div>
|
|
</div>
|
|
</>
|
|
}
|