feat:支持身体围度数据展示
This commit is contained in:
@@ -19,9 +19,9 @@ export function useAuthGuard() {
|
||||
const router = useRouter();
|
||||
const dispatch = useAppDispatch();
|
||||
const currentPath = usePathname();
|
||||
const token = useAppSelector((s) => (s as any)?.user?.token as string | null);
|
||||
const user = useAppSelector(state => state.user);
|
||||
|
||||
const isLoggedIn = !!token;
|
||||
const isLoggedIn = !!user?.profile?.id;
|
||||
|
||||
const ensureLoggedIn = useCallback(async (options?: EnsureOptions): Promise<boolean> => {
|
||||
if (isLoggedIn) return true;
|
||||
|
||||
Reference in New Issue
Block a user