You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
240 B
JavaScript

import {useEffect} from 'react'
import Router from 'next/router'
import useUser from './useUser'
export default function useAccountRedirect(){
const user = useUser()
useEffect(()=>{
if(user) Router.push('/account')
}, [user])
}