Whalebird-desktop-client-ma.../renderer/pages/accounts/[id]/index.tsx

21 lines
569 B
TypeScript
Raw Normal View History

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">
<Spinner />
2023-11-04 10:14:00 +01:00
</div>
)
2023-11-01 17:20:27 +01:00
}