From 8a9107cdf2dc7364645eda8d93539381944110ae Mon Sep 17 00:00:00 2001 From: Christian Andolf Date: Wed, 16 Apr 2025 14:11:24 +0200 Subject: [PATCH] fix: now using the correct method to instantiate motion since its constructor is deprecated in favor of the create method --- .../components/Blocks/DynamicContent/Rewards/Redeem/index.tsx | 4 ++-- apps/scandic-web/components/Modal/index.tsx | 4 ++-- apps/scandic-web/components/MyPages/Surprises/Client.tsx | 2 +- .../design-system/lib/components/RateCard/Modal/index.tsx | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/index.tsx b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/index.tsx index bf20c1e2f..9b706d47e 100644 --- a/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/index.tsx +++ b/apps/scandic-web/components/Blocks/DynamicContent/Rewards/Redeem/index.tsx @@ -32,8 +32,8 @@ import type { } from "@/types/components/myPages/myPage/accountPage" import type { Reward } from "@/types/components/myPages/rewards" -const MotionOverlay = motion(ModalOverlay) -const MotionModal = motion(Modal) +const MotionOverlay = motion.create(ModalOverlay) +const MotionModal = motion.create(Modal) const thirtyMinutesInMs = 1000 * 60 * 30 diff --git a/apps/scandic-web/components/Modal/index.tsx b/apps/scandic-web/components/Modal/index.tsx index 1d01cd3aa..19eb3e8e8 100644 --- a/apps/scandic-web/components/Modal/index.tsx +++ b/apps/scandic-web/components/Modal/index.tsx @@ -26,8 +26,8 @@ import { modalContentVariants } from "./variants" import styles from "./modal.module.css" -const MotionOverlay = motion(ModalOverlay) -const MotionModal = motion(AriaModal) +const MotionOverlay = motion.create(ModalOverlay) +const MotionModal = motion.create(AriaModal) function InnerModal({ animation, diff --git a/apps/scandic-web/components/MyPages/Surprises/Client.tsx b/apps/scandic-web/components/MyPages/Surprises/Client.tsx index 18f584393..92b747db2 100644 --- a/apps/scandic-web/components/MyPages/Surprises/Client.tsx +++ b/apps/scandic-web/components/MyPages/Surprises/Client.tsx @@ -30,7 +30,7 @@ import styles from "./surprises.module.css" import type { SurprisesProps } from "@/types/components/blocks/surprises" import type { Surprise } from "@/types/components/myPages/rewards" -const MotionModal = motion(Modal) +const MotionModal = motion.create(Modal) export default function SurprisesNotification({ surprises: initialData, diff --git a/packages/design-system/lib/components/RateCard/Modal/index.tsx b/packages/design-system/lib/components/RateCard/Modal/index.tsx index 8dc4022c9..25a1981c3 100644 --- a/packages/design-system/lib/components/RateCard/Modal/index.tsx +++ b/packages/design-system/lib/components/RateCard/Modal/index.tsx @@ -21,8 +21,8 @@ import styles from './modal.module.css' import { Typography } from '../../Typography' import { MaterialIcon } from '../../Icons/MaterialIcon' -const MotionOverlay = motion(ModalOverlay) -const MotionModal = motion(AriaModal) +const MotionOverlay = motion.create(ModalOverlay) +const MotionModal = motion.create(AriaModal) function InnerModal({ animation,