fix: remove old logic for defining the return layout (#148)

This commit is contained in:
Aslam
2024-09-08 04:00:48 +07:00
committed by GitHub
parent aea2431934
commit 9e4544894c

View File

@@ -3,16 +3,9 @@
import { Sidebar } from "@/components/custom/sidebar/sidebar"
import { CommandPalette } from "@/components/custom/command-palette/command-palette"
import { useAccountOrGuest } from "@/lib/providers/jazz-provider"
import { usePathname } from "next/navigation"
import PublicHomeRoute from "@/components/routes/public/PublicHomeRoute"
export default function PageLayout({ children }: { children: React.ReactNode }) {
const { me } = useAccountOrGuest()
const pathname = usePathname()
if (me._type === "Anonymous" && pathname === "/") {
return <PublicHomeRoute />
}
return (
<div className="flex h-full min-h-full w-full flex-row items-stretch overflow-hidden">