mirror of
https://gitee.com/wanwujie/sub2api-mobile
synced 2026-04-24 00:34:46 +08:00
fix: require live admin key on web auth gating
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
import { Redirect } from 'expo-router';
|
||||
|
||||
import { adminConfigState } from '@/src/store/admin-config';
|
||||
import { adminConfigState, hasAuthenticatedAdminSession } from '@/src/store/admin-config';
|
||||
|
||||
const { useSnapshot } = require('valtio/react');
|
||||
|
||||
export default function IndexScreen() {
|
||||
const config = useSnapshot(adminConfigState);
|
||||
const hasAccount = Boolean(config.baseUrl.trim());
|
||||
const hasAccount = hasAuthenticatedAdminSession(config);
|
||||
|
||||
return <Redirect href={hasAccount ? '/monitor' : '/login'} />;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user