12 lines
331 B
TypeScript
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;
|
|
};
|