2024-01-09 13:30:05 +01:00
|
|
|
import { Spinner } from '@material-tailwind/react'
|
2023-11-01 17:20:27 +01:00
|
|
|
import { useRouter } from 'next/router'
|
|
|
|
|
2023-11-04 10:14:00 +01:00
|
|
|
export default function Account() {
|
2023-11-01 17:20:27 +01:00
|
|
|
const router = useRouter()
|
2023-11-02 17:04:47 +01:00
|
|
|
if (typeof localStorage !== 'undefined') {
|
|
|
|
const lastTimeline = localStorage.getItem(`${router.query.id}_lastTimeline`)
|
|
|
|
if (lastTimeline) {
|
|
|
|
router.push(`/accounts/${router.query.id}/${lastTimeline}`)
|
|
|
|
} else {
|
|
|
|
router.push(`/accounts/${router.query.id}/home`)
|
|
|
|
}
|
2023-11-01 17:20:27 +01:00
|
|
|
}
|
|
|
|
|
2023-11-04 10:14:00 +01:00
|
|
|
return (
|
|
|
|
<div className="h-screen w-full flex justify-center items-center">
|
2024-01-09 13:30:05 +01:00
|
|
|
<Spinner />
|
2023-11-04 10:14:00 +01:00
|
|
|
</div>
|
|
|
|
)
|
2023-11-01 17:20:27 +01:00
|
|
|
}
|