import { useState } from "react"; import Image from "next/image"; import { useRouter } from "next/router"; // hooks import { useProject, useUser } from "hooks/store"; // ui import { Button } from "@plane/ui"; // icons import { ClipboardList } from "lucide-react"; // images import JoinProjectImg from "public/auth/project-not-authorized.svg"; export const JoinProject: React.FC = () => { // states const [isJoiningProject, setIsJoiningProject] = useState(false); // store hooks const { membership: { joinProject }, } = useUser(); const { fetchProjects } = useProject(); const router = useRouter(); const { workspaceSlug, projectId } = router.query; const handleJoin = () => { if (!workspaceSlug || !projectId) return; setIsJoiningProject(true); joinProject(workspaceSlug.toString(), [projectId.toString()]) .then(() => fetchProjects(workspaceSlug.toString())) .finally(() => setIsJoiningProject(false)); }; return (
JoinProject

You are not a member of this project

You are not a member of this project, but you can join this project by clicking the button below.

); };