mirror of
https://github.com/langgenius/dify.git
synced 2026-08-30 20:43:55 +08:00
17 lines
445 B
TypeScript
17 lines
445 B
TypeScript
'use client'
|
|
import type { FC, PropsWithChildren } from 'react'
|
|
import * as React from 'react'
|
|
import { useIsLogin } from '@/service/use-common'
|
|
|
|
const Splash: FC<PropsWithChildren> = () => {
|
|
// would auto redirect to signin page if not logged in
|
|
const { isLoading, data: loginData } = useIsLogin()
|
|
const isLoggedIn = loginData?.logged_in
|
|
|
|
if (isLoading || !isLoggedIn)
|
|
return null
|
|
|
|
return null
|
|
}
|
|
export default React.memo(Splash)
|