Skip to content

🎥 Make videos programmatically with React

Docs: Avoid loading motion blur font during SSR

JonnyBurgerae0127ffd753
diff --git a/packages/docs/components/demos/MotionBlurDemo.tsx b/packages/docs/components/demos/MotionBlurDemo.tsx
index e5c9de4ded..7ec33342a6 100644
--- a/packages/docs/components/demos/MotionBlurDemo.tsx
+++ b/packages/docs/components/demos/MotionBlurDemo.tsx
@@ -16,11 +16,13 @@ import {
import {HtmlInCanvasDocsVideoFallback} from './HtmlInCanvasDocsVideoFallback';
import {useHtmlInCanvasDocsDemoBranch} from './useHtmlInCanvasDocsDemoBranch';
-loadFont({
- family: 'GT Planar',
- url: staticFile('img/gt-planar-bold.woff2'),
- weight: '700',
-});
+if (typeof window !== 'undefined') {
+ loadFont({
+ family: 'GT Planar',
+ url: staticFile('img/gt-planar-bold.woff2'),
+ weight: '700',
+ });
+}
type MotionBlurDemoProps = {
readonly darkMode?: boolean;