import { Navigate, Outlet } from "react-router-dom"
import { useUserStore } from "@root/stores/user"


export default function PrivateRoute() {
	const user = useUserStore(state => state.user)

	return user ? <Outlet /> : <Navigate to="/" replace />
}
