plane/space/app/issues/[anchor]/page.tsx

31 lines
723 B
TypeScript
Raw Normal View History

2024-06-04 08:08:47 +00:00
"use client";
2024-06-04 15:03:42 +00:00
import { observer } from "mobx-react-lite";
2024-06-04 08:08:47 +00:00
import { useSearchParams } from "next/navigation";
// components
import { ProjectDetailsView } from "@/components/views";
// hooks
import { usePublish } from "@/hooks/store";
2024-06-04 08:08:47 +00:00
type Props = {
params: {
anchor: string;
};
};
2024-06-04 15:03:42 +00:00
const ProjectIssuesPage =observer ((props: Props) => {
2024-06-04 08:08:47 +00:00
const { params } = props;
const { anchor } = params;
// params
const searchParams = useSearchParams();
const peekId = searchParams.get("peekId") || undefined;
const publishSettings = usePublish(anchor);
2024-06-04 08:08:47 +00:00
if (!publishSettings) return null;
return <ProjectDetailsView peekId={peekId} publishSettings={publishSettings} />;
2024-06-04 15:03:42 +00:00
});
2024-06-04 08:08:47 +00:00
export default ProjectIssuesPage;