Browse Source

fix: only enterprise version request app access mode (#20785)

tags/1.4.2
非法操作 4 months ago
parent
commit
f601093ccc
No account linked to committer's email address
1 changed files with 6 additions and 0 deletions
  1. 6
    0
      web/app/(shareLayout)/layout.tsx

+ 6
- 0
web/app/(shareLayout)/layout.tsx View File

@@ -12,12 +12,18 @@ const Layout: FC<{
}> = ({ children }) => {
const isGlobalPending = useGlobalPublicStore(s => s.isGlobalPending)
const setWebAppAccessMode = useGlobalPublicStore(s => s.setWebAppAccessMode)
const systemFeatures = useGlobalPublicStore(s => s.systemFeatures)
const pathname = usePathname()
const searchParams = useSearchParams()
const redirectUrl = searchParams.get('redirect_url')
const [isLoading, setIsLoading] = useState(true)
useEffect(() => {
(async () => {
if (!systemFeatures.webapp_auth.enabled) {
setIsLoading(false)
return
}

let appCode: string | null = null
if (redirectUrl)
appCode = redirectUrl?.split('/').pop() || null

Loading…
Cancel
Save