'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 (
); }