plane/space/app/page/page.tsx
2024-06-04 19:07:35 +05:30

28 lines
596 B
TypeScript

"use client";
import useSWR from "swr";
// hooks
import { usePublish, usePublishList } from "@/hooks/store";
type Props = {
params: {
anchor: string;
};
};
const PageDetailsPage = (props: Props) => {
const { params } = props;
const { anchor } = params;
// store hooks
const { fetchPublishSettings } = usePublishList();
const publishSettings = usePublish(anchor);
useSWR(anchor ? `PUBLISH_SETTINGS_${anchor}` : null, anchor ? () => fetchPublishSettings(anchor) : null);
if (!publishSettings) return null;
return <>Page details</>;
};
export default PageDetailsPage;