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

21 lines
572 B
TypeScript
Raw Normal View History

2023-11-01 17:20:27 +01:00
import { useRouter } from 'next/router'
2024-01-03 09:24:19 +01:00
import { Spinner } from 'flowbite-react'
2023-11-01 17:20:27 +01:00
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-03 09:24:19 +01:00
<Spinner color="info" />
2023-11-04 10:14:00 +01:00
</div>
)
2023-11-01 17:20:27 +01:00
}