Skip to content

Commit

Permalink
fix(onboarding): fix ref unfound
Browse files Browse the repository at this point in the history
  • Loading branch information
deli-ght committed Aug 7, 2023
1 parent e34f6fe commit 0c846f4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion apps/onboarding/src/app/result/components/ResultContents.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ export const ResultContents = () => {
const glasses = Number(searchParams?.get('glasses'));
const baseY = useMotionValue(0);
const backgroundRef = useRef<HTMLDivElement>(null);
const scrollHeight = backgroundRef.current?.scrollHeight ?? 0;
const scrollHeight = backgroundRef.current?.scrollHeight ?? 200;

const opacityOfY = useTransform(
baseY,
(v) => `${Math.max((v / scrollHeight) * 100, 30)}`
Expand Down

0 comments on commit 0c846f4

Please sign in to comment.