-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathEmptyCapState.tsx
More file actions
51 lines (49 loc) · 1.84 KB
/
EmptyCapState.tsx
File metadata and controls
51 lines (49 loc) · 1.84 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import { Button } from "@cap/ui";
import { faDownload } from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { useRive } from "@rive-app/react-canvas";
import { useTheme } from "../../Contexts";
import { UploadCapButton } from "./UploadCapButton";
import { WebRecorderDialog } from "./web-recorder-dialog/web-recorder-dialog";
interface EmptyCapStateProps {
userName?: string;
}
export const EmptyCapState: React.FC<EmptyCapStateProps> = ({ userName }) => {
const { theme } = useTheme();
const { RiveComponent: EmptyCap } = useRive({
src: "/rive/main.riv",
artboard: theme === "light" ? "empty" : "darkempty",
autoplay: true,
});
return (
<div className="flex flex-col flex-1 justify-center items-center w-full h-full">
<div className="flex flex-col gap-3 justify-center items-center h-full text-center">
<div className="mx-auto w-full mb-10 max-w-[450px] flex justify-center items-center">
<EmptyCap key={theme + "empty-cap"} className="h-[150px] w-[400px]" />
</div>
<div className="flex flex-col items-center px-5">
<p className="mb-1 text-xl font-semibold text-gray-12">
Hey{userName ? ` ${userName}` : ""}! Record your first Cap
</p>
<p className="max-w-md text-gray-10 text-md">
Craft your narrative with Cap - get projects done quicker.
</p>
</div>
<div className="flex flex-wrap gap-3 justify-center items-center mt-4">
<Button
href="/download"
className="flex relative gap-2 justify-center items-center"
variant="primary"
>
<FontAwesomeIcon className="size-3.5" icon={faDownload} />
Download Cap
</Button>
<p className="text-sm text-gray-10">or</p>
<WebRecorderDialog />
<p className="text-sm text-gray-10">or</p>
<UploadCapButton />
</div>
</div>
</div>
);
};