"use client"; import { useState } from "react"; import Image from "next/image"; import { useParams } from "next/navigation"; // hooks import { ClipboardList } from "lucide-react"; import { Button } from "@plane/ui"; import { useProject, useUser } from "@/hooks/store"; // ui // icons // 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 { workspaceSlug, projectId } = useParams(); 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.

); };