import React, { useState } from "react"; import { useRouter } from "next/router"; import { mutate } from "swr"; import type { NextPage } from "next"; // services import projectService from "services/project.service"; // hooks import useProjects from "hooks/use-projects"; import useWorkspaces from "hooks/use-workspaces"; import useUserAuth from "hooks/use-user-auth"; // layouts import { WorkspaceAuthorizationLayout } from "layouts/auth-layout-legacy"; // ui import { Icon, PrimaryButton } from "components/ui"; import { Breadcrumbs, BreadcrumbItem } from "components/breadcrumbs"; // icons import { PlusIcon } from "@heroicons/react/24/outline"; // helper import { truncateText } from "helpers/string.helper"; // lib import { useMobxStore } from "lib/mobx/store-provider"; // components import { ProjectCardList } from "components/project"; const ProjectsPage: NextPage = () => { // router const router = useRouter(); const { workspaceSlug } = router.query; // store const { project: projectStore } = useMobxStore(); // context data const { activeWorkspace } = useWorkspaces(); return ( } right={
projectStore.setSearchQuery(e.target.value)} placeholder="Search" />
{ const e = new KeyboardEvent("keydown", { key: "p" }); document.dispatchEvent(e); }} > Add Project
} > {workspaceSlug && }
); }; export default ProjectsPage;