mirror of
https://github.com/makeplane/plane.git
synced 2026-06-14 03:30:00 +00:00
83fdebf64d
- Add jscodeshift-based codemod to convert arrow function components to function declarations - Support React.FC, observer-wrapped, and forwardRef components - Include comprehensive test suite covering edge cases - Add npm script to run transformer across codebase - Target only .tsx files in source directories, excluding node_modules and declaration files * [WEB-5459] chore: updates after running codemod --------- Co-authored-by: sriramveeraghanta <veeraghanta.sriram@gmail.com>
34 lines
1.1 KiB
TypeScript
34 lines
1.1 KiB
TypeScript
"use client";
|
|
|
|
import { observer } from "mobx-react";
|
|
import { useParams, useSearchParams } from "next/navigation";
|
|
import useSWR from "swr";
|
|
// components
|
|
import { IssuesLayoutsRoot } from "@/components/issues/issue-layouts";
|
|
// hooks
|
|
import { usePublish } from "@/hooks/store/publish";
|
|
import { useLabel } from "@/hooks/store/use-label";
|
|
import { useStates } from "@/hooks/store/use-state";
|
|
|
|
const IssuesPage = observer(function IssuesPage() {
|
|
// params
|
|
const params = useParams<{ anchor: string }>();
|
|
const { anchor } = params;
|
|
const searchParams = useSearchParams();
|
|
const peekId = searchParams.get("peekId") || undefined;
|
|
// store
|
|
const { fetchStates } = useStates();
|
|
const { fetchLabels } = useLabel();
|
|
|
|
useSWR(anchor ? `PUBLIC_STATES_${anchor}` : null, anchor ? () => fetchStates(anchor) : null);
|
|
useSWR(anchor ? `PUBLIC_LABELS_${anchor}` : null, anchor ? () => fetchLabels(anchor) : null);
|
|
|
|
const publishSettings = usePublish(anchor);
|
|
|
|
if (!publishSettings) return null;
|
|
|
|
return <IssuesLayoutsRoot peekId={peekId} publishSettings={publishSettings} />;
|
|
});
|
|
|
|
export default IssuesPage;
|