bbuddy-ui/src/app/[locale]/account/page.tsx

12 lines
331 B
TypeScript

'use client';
import { redirect } from 'next/navigation';
import { useLocalStorage } from '../../../hooks/useLocalStorage';
import { AUTH_TOKEN_KEY } from '../../../constants/common';
export default function Account() {
const [token] = useLocalStorage(AUTH_TOKEN_KEY, '');
return token ? redirect('sessions') : null;
};