bb-plane-fork/space/app/views/[anchor]/page.tsx
rahulramesha 8577a56068
[WEB-1255] chore: Required Spaces refactor (#5177)
* Changes required to enable Publish Views

* default views to not found page

* refactor exports

* remove uncessary view service

* fix review comments
2024-07-22 16:01:46 +05:30

30 lines
720 B
TypeScript

"use client";
import { observer } from "mobx-react";
import { useSearchParams } from "next/navigation";
// hooks
import { usePublish } from "@/hooks/store";
// plane-web
import { ViewLayoutsRoot } from "@/plane-web/components/issue-layouts/root";
type Props = {
params: {
anchor: string;
};
};
const IssuesPage = observer((props: Props) => {
const { params } = props;
const { anchor } = params;
// params
const searchParams = useSearchParams();
const peekId = searchParams.get("peekId") || undefined;
const publishSettings = usePublish(anchor);
if (!publishSettings) return null;
return <ViewLayoutsRoot peekId={peekId} publishSettings={publishSettings} />;
});
export default IssuesPage;