Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

perf(web): dynamically import MuxPlayer in video modal

Richie McIlroya0d874267508
diff --git a/apps/web/components/pages/HomePage/VideoModal.tsx b/apps/web/components/pages/HomePage/VideoModal.tsx
index 3afae5ffd..0f56592d3 100644
--- a/apps/web/components/pages/HomePage/VideoModal.tsx
+++ b/apps/web/components/pages/HomePage/VideoModal.tsx
@@ -2,11 +2,15 @@
"use client";
-import MuxPlayer from "@mux/mux-player-react";
import { useClickAway } from "@uidotdev/usehooks";
import { motion } from "framer-motion";
+import dynamic from "next/dynamic";
import type React from "react";
+const MuxPlayer = dynamic(() => import("@mux/mux-player-react"), {
+ ssr: false,
+});
+
interface Props {
setVideoToggled: React.Dispatch<React.SetStateAction<boolean>>;
}