Skip to content

Commit 52dd94d

Browse files
committed
Wrap window to make the build work
1 parent 1e666eb commit 52dd94d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/app/conf/2025/components/gallery-strip/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"use client"
22

3-
import { useRef, useState } from "react"
3+
import { useState } from "react"
44
import { clsx } from "clsx"
55
import Image from "next-image-export-optimizer"
66
import type { StaticImageData } from "next/image"

src/app/conf/_design-system/marquee.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import { clsx } from "clsx"
44
import { useMotionValue, animate, motion } from "motion/react"
5-
import { useState, useEffect, Fragment, useRef } from "react"
5+
import { useState, useEffect, Fragment } from "react"
66
import useMeasure from "react-use-measure"
77

88
export interface MarqueeProps {
@@ -121,7 +121,10 @@ export function Marquee({
121121
? {
122122
right: 0,
123123
// window.innerWidth won't be stale because resizing the window triggers useMeasure
124-
left: window.innerWidth - width,
124+
left:
125+
typeof window !== "undefined"
126+
? window.innerWidth - width
127+
: undefined,
125128
}
126129
: {},
127130
}

0 commit comments

Comments
 (0)