fix: only enterprise version request app access mode (#20785)
This commit is contained in:
parent
0f3d4d0b6e
commit
f601093ccc
1 changed files with 6 additions and 0 deletions
|
|
@ -12,12 +12,18 @@ const Layout: FC<{
|
||||||
}> = ({ children }) => {
|
}> = ({ children }) => {
|
||||||
const isGlobalPending = useGlobalPublicStore(s => s.isGlobalPending)
|
const isGlobalPending = useGlobalPublicStore(s => s.isGlobalPending)
|
||||||
const setWebAppAccessMode = useGlobalPublicStore(s => s.setWebAppAccessMode)
|
const setWebAppAccessMode = useGlobalPublicStore(s => s.setWebAppAccessMode)
|
||||||
|
const systemFeatures = useGlobalPublicStore(s => s.systemFeatures)
|
||||||
const pathname = usePathname()
|
const pathname = usePathname()
|
||||||
const searchParams = useSearchParams()
|
const searchParams = useSearchParams()
|
||||||
const redirectUrl = searchParams.get('redirect_url')
|
const redirectUrl = searchParams.get('redirect_url')
|
||||||
const [isLoading, setIsLoading] = useState(true)
|
const [isLoading, setIsLoading] = useState(true)
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
(async () => {
|
(async () => {
|
||||||
|
if (!systemFeatures.webapp_auth.enabled) {
|
||||||
|
setIsLoading(false)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
let appCode: string | null = null
|
let appCode: string | null = null
|
||||||
if (redirectUrl)
|
if (redirectUrl)
|
||||||
appCode = redirectUrl?.split('/').pop() || null
|
appCode = redirectUrl?.split('/').pop() || null
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue