21 lines
569 B
TypeScript
Raw Normal View History

import { Spinner } from '@material-tailwind/react'
2023-11-02 01:20:27 +09:00
import { useRouter } from 'next/router'
2023-11-04 18:14:00 +09:00
export default function Account() {
2023-11-02 01:20:27 +09:00
const router = useRouter()
2023-11-03 01:04:47 +09: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-02 01:20:27 +09:00
}
2023-11-04 18:14:00 +09:00
return (
<div className="h-screen w-full flex justify-center items-center">
<Spinner />
2023-11-04 18:14:00 +09:00
</div>
)
2023-11-02 01:20:27 +09:00
}