import { ReactElement, useEffect, useRef } from "react"; import { combine } from "@atlaskit/pragmatic-drag-and-drop/combine"; import { autoScrollForElements } from "@atlaskit/pragmatic-drag-and-drop-auto-scroll/element"; import { observer } from "mobx-react"; // layouts import { PageHead } from "@/components/core"; import { ProjectSettingHeader } from "@/components/headers"; import { ProjectSettingsLabelList } from "@/components/labels"; import { useProject } from "@/hooks/store"; import { AppLayout } from "@/layouts/app-layout"; import { ProjectSettingLayout } from "@/layouts/settings-layout"; // components // types import { NextPageWithLayout } from "@/lib/types"; // hooks const LabelsSettingsPage: NextPageWithLayout = observer(() => { const { currentProjectDetails } = useProject(); const pageTitle = currentProjectDetails?.name ? `${currentProjectDetails?.name} - Labels` : undefined; const scrollableContainerRef = useRef(null); // Enable Auto Scroll for Labels list useEffect(() => { const element = scrollableContainerRef.current; if (!element) return; return combine( autoScrollForElements({ element, }) ); }, [scrollableContainerRef?.current]); return ( <>
); }); LabelsSettingsPage.getLayout = function getLayout(page: ReactElement) { return ( }> {page} ); }; export default LabelsSettingsPage;