Open source Loom alternative. Beautiful, shareable screen recordings.
Rust appcapcossloommacnextjsnextjs15open-sourceossreactrecordrustscreen-capturescreen-recorderscreenshotsolidjstauritauri-apptypescriptvite
Improvement: Dark empty state rive animation for caps (#499)
Ameer Al Ashhab9c99a1867dba
diff --git a/apps/web/app/dashboard/caps/components/EmptyCapState.tsx b/apps/web/app/dashboard/caps/components/EmptyCapState.tsxindex d4677b63b..d39faa2bc 100644--- a/apps/web/app/dashboard/caps/components/EmptyCapState.tsx+++ b/apps/web/app/dashboard/caps/components/EmptyCapState.tsx@@ -1,13 +1,15 @@import { Button } from "@cap/ui";import { useRive } from "@rive-app/react-canvas";+import { useTheme } from "../../_components/DynamicSharedLayout";interface EmptyCapStateProps {userName?: string;}export const EmptyCapState: React.FC<EmptyCapStateProps> = ({ userName }) => {+ const { theme } = useTheme();const { RiveComponent: EmptyCap } = useRive({- src: "/rive/capsempty.riv",+ src: theme === "light" ? "/rive/capsempty.riv" : "/rive/darkcapsempty.riv",artboard: "empty",autoplay: true,});@@ -15,7 +17,7 @@ export const EmptyCapState: React.FC<EmptyCapStateProps> = ({ userName }) => {<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 className="h-[150px] w-[400px]" />+ <EmptyCap key={theme + "empty-cap"} className="h-[150px] w-[400px]" /></div><div className="flex flex-col items-center"><p className="mb-1 text-xl font-semibold text-gray-12">diff --git a/apps/web/public/rive/darkcapsempty.riv b/apps/web/public/rive/darkcapsempty.rivnew file mode 100644index 000000000..c8a898e07Binary files /dev/null and b/apps/web/public/rive/darkcapsempty.riv differ