import Image from "next/image"; import { notFound } from "next/navigation"; import useSWR from "swr"; // components import IssueNavbar from "@/components/issues/navbar"; // hooks import { usePublish, usePublishList } from "@/hooks/store"; // assets import planeLogo from "@/public/plane-logo.svg"; type Props = { children: React.ReactNode; params: { anchor: string } }; const PageDetailsLayout = (props: Props) => { const { children, params } = props; // params const { anchor } = params; // store hooks const { fetchPublishSettings } = usePublishList(); const publishSettings = usePublish(anchor); const { id, workspace_detail, project } = publishSettings; useSWR(anchor ? `PUBLISH_SETTINGS_${anchor}` : null, anchor ? () => fetchPublishSettings(anchor) : null); if (!workspace_detail || !project || !id) notFound(); return (
); }; export default PageDetailsLayout;