mirror of
https://gitee.com/wanwujie/sub2api-mobile
synced 2026-04-03 06:52:14 +08:00
13 lines
398 B
TypeScript
13 lines
398 B
TypeScript
import { Redirect } from 'expo-router';
|
|
|
|
import { adminConfigState, hasAuthenticatedAdminSession } from '@/src/store/admin-config';
|
|
|
|
const { useSnapshot } = require('valtio/react');
|
|
|
|
export default function IndexScreen() {
|
|
const config = useSnapshot(adminConfigState);
|
|
const hasAccount = hasAuthenticatedAdminSession(config);
|
|
|
|
return <Redirect href={hasAccount ? '/monitor' : '/login'} />;
|
|
}
|