Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

[CAP-317] Empty Shared Caps State (#501)

Ameer Al Ashhabe15f4c4a2b94
diff --git a/apps/web/app/dashboard/caps/components/EmptyCapState.tsx b/apps/web/app/dashboard/caps/components/EmptyCapState.tsx
index d39faa2bc..be1a4e1bd 100644
--- a/apps/web/app/dashboard/caps/components/EmptyCapState.tsx
+++ b/apps/web/app/dashboard/caps/components/EmptyCapState.tsx
@@ -9,8 +9,8 @@ interface EmptyCapStateProps {
export const EmptyCapState: React.FC<EmptyCapStateProps> = ({ userName }) => {
const { theme } = useTheme();
const { RiveComponent: EmptyCap } = useRive({
- src: theme === "light" ? "/rive/capsempty.riv" : "/rive/darkcapsempty.riv",
- artboard: "empty",
+ src: "/rive/empty.riv",
+ artboard: theme === "light" ? "empty" : "darkempty",
autoplay: true,
});
return (
@@ -19,7 +19,7 @@ export const EmptyCapState: React.FC<EmptyCapStateProps> = ({ userName }) => {
<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">
+ <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>
diff --git a/apps/web/app/dashboard/shared-caps/components/EmptySharedCapState.tsx b/apps/web/app/dashboard/shared-caps/components/EmptySharedCapState.tsx
index 9f2adeee3..82210c576 100644
--- a/apps/web/app/dashboard/shared-caps/components/EmptySharedCapState.tsx
+++ b/apps/web/app/dashboard/shared-caps/components/EmptySharedCapState.tsx
@@ -1,3 +1,6 @@
+import { useRive } from "@rive-app/react-canvas";
+import { useTheme } from "../../_components/DynamicSharedLayout";
+
interface EmptySharedCapStateProps {
spaceName: string;
}
@@ -5,13 +8,18 @@ interface EmptySharedCapStateProps {
export const EmptySharedCapState: React.FC<EmptySharedCapStateProps> = ({
spaceName,
}) => {
+ const { theme } = useTheme();
+ const { RiveComponent: EmptyCap } = useRive({
+ src: "/rive/empty.riv",
+ artboard: theme === "light" ? "emptyshared" : "darkemptyshared",
+ autoplay: true,
+ });
return (
<div className="flex flex-col flex-1 justify-center items-center w-full h-full">
- <div className="mx-auto w-full max-w-md">
- <img
- className="w-full max-w-[400px] h-auto"
- src="/illustrations/person-microphone.svg"
- alt="Person using microphone"
+ <div className="mx-auto mb-20 w-full max-w-md">
+ <EmptyCap
+ key={theme + "empty-shared-cap"}
+ className="max-w-[300px] w-full mx-auto md:max-w-[600px] h-[250px]"
/>
</div>
<div className="text-center pb-[30px]">
diff --git a/apps/web/public/rive/capsempty.riv b/apps/web/public/rive/capsempty.riv
deleted file mode 100644
index fd0a32cce..000000000
Binary files a/apps/web/public/rive/capsempty.riv and /dev/null differ
diff --git a/apps/web/public/rive/darkcapsempty.riv b/apps/web/public/rive/empty.riv
similarity index 94%
rename from apps/web/public/rive/darkcapsempty.riv
rename to apps/web/public/rive/empty.riv
index c8a898e07..98d24e8c6 100644
Binary files a/apps/web/public/rive/darkcapsempty.riv and b/apps/web/public/rive/empty.riv differ