Files
ordr/ordr-ui/app/page.tsx
2025-11-17 21:07:51 -07:00

33 lines
1.0 KiB
TypeScript

'use client'
import Image from "next/image";
import { useAsyncEffect } from 'use-async-effect'
import { useShallow } from 'zustand/react/shallow'
import { UserResponse } from './client/response'
import { useCurrentAuthenticatedUserStore, UserActions } from './providers'
import { useRouter } from "next/navigation";
import { useEffect } from "react";
export default function Home() {
const authenticatedUserStore: UserResponse & UserActions = useCurrentAuthenticatedUserStore(useShallow((state) => ({
...state
})))
useAsyncEffect(async () => {
if(authenticatedUserStore.Id === -1) {
await authenticatedUserStore.sync()
}
})
const router = useRouter()
useEffect(() => {
router.push('/orders/0/0')
}, [router])
return (
<div className="flex min-h-screen items-center justify-center bg-zinc-50 font-sans dark:bg-black">
<main className="flex min-h-screen w-full max-w-3xl flex-col items-center justify-between py-32 px-16 bg-white dark:bg-black sm:items-start">
</main>
</div>
);
}