2023-01-26 18:12:20 +00:00
|
|
|
import { FC } from "react";
|
2023-03-21 07:16:12 +00:00
|
|
|
// next
|
|
|
|
import Image from "next/image";
|
2023-03-17 05:10:38 +00:00
|
|
|
|
2023-01-26 18:12:20 +00:00
|
|
|
// ui
|
2023-03-21 07:16:12 +00:00
|
|
|
import { PrimaryButton } from "components/ui";
|
|
|
|
// icon
|
|
|
|
import { AssignmentClipboardIcon } from "components/icons";
|
|
|
|
// img
|
|
|
|
import JoinProjectImg from "public/join-project.svg";
|
2023-01-26 18:12:20 +00:00
|
|
|
|
|
|
|
export interface JoinProjectProps {
|
|
|
|
isJoiningProject: boolean;
|
|
|
|
handleJoin: () => void;
|
|
|
|
}
|
|
|
|
|
|
|
|
export const JoinProject: FC<JoinProjectProps> = ({ isJoiningProject, handleJoin }) => (
|
2023-03-21 07:16:12 +00:00
|
|
|
<div className="flex h-full w-full flex-col items-center justify-center gap-y-5 text-center">
|
|
|
|
<div className="h-44 w-72">
|
|
|
|
<Image src={JoinProjectImg} height="176" width="288" alt="JoinProject" />
|
|
|
|
</div>
|
|
|
|
<h1 className="text-xl font-medium text-gray-900">You are not a member of this project</h1>
|
|
|
|
|
|
|
|
<div className="w-full max-w-md text-base text-gray-500 ">
|
2023-01-26 18:12:20 +00:00
|
|
|
<p className="mx-auto w-full text-sm md:w-3/4">
|
|
|
|
You are not a member of this project, but you can join this project by clicking the button
|
|
|
|
below.
|
|
|
|
</p>
|
2023-03-21 07:16:12 +00:00
|
|
|
</div>
|
|
|
|
<div>
|
|
|
|
<PrimaryButton
|
|
|
|
className="flex items-center gap-1"
|
|
|
|
loading={isJoiningProject}
|
|
|
|
onClick={handleJoin}
|
|
|
|
>
|
|
|
|
<AssignmentClipboardIcon height={16} width={16} color="white" />
|
|
|
|
{isJoiningProject ? "Joining..." : "Click to join"}
|
|
|
|
</PrimaryButton>
|
2023-01-26 18:12:20 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
);
|