From c784561c9e1562c6bbe699885b305fb3c8664877 Mon Sep 17 00:00:00 2001 From: Jordan Lawrence Date: Fri, 27 Dec 2024 17:33:42 +0000 Subject: [PATCH] chore: removing deprecated motion for motion.create (#8145) --- .../src/core/releases/tool/components/Table/TableHeader.tsx | 2 +- .../src/core/releases/tool/detail/ReleaseActivityListItem.tsx | 2 +- .../releases/tool/detail/ReleaseDashboardActivityPanel.tsx | 2 +- .../src/core/releases/tool/overview/ReleasesOverview.tsx | 4 ++-- .../panes/document/timeline/events/EventsTimeline.tsx | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/sanity/src/core/releases/tool/components/Table/TableHeader.tsx b/packages/sanity/src/core/releases/tool/components/Table/TableHeader.tsx index c2cf8e2925d..56ce3a754f0 100644 --- a/packages/sanity/src/core/releases/tool/components/Table/TableHeader.tsx +++ b/packages/sanity/src/core/releases/tool/components/Table/TableHeader.tsx @@ -7,7 +7,7 @@ import {Button, type ButtonProps} from '../../../../../ui-components' import {useTableContext} from './TableProvider' import {type HeaderProps, type TableHeaderProps} from './types' -const MotionIcon = motion(ArrowUpIcon) +const MotionIcon = motion.create(ArrowUpIcon) const BasicHeader = ({text}: {text: string}) => ( diff --git a/packages/sanity/src/core/releases/tool/detail/ReleaseActivityListItem.tsx b/packages/sanity/src/core/releases/tool/detail/ReleaseActivityListItem.tsx index fdd4defdc3b..762388eab98 100644 --- a/packages/sanity/src/core/releases/tool/detail/ReleaseActivityListItem.tsx +++ b/packages/sanity/src/core/releases/tool/detail/ReleaseActivityListItem.tsx @@ -98,7 +98,7 @@ const ScheduleTarget = ({children, event}: {children: ReactNode; event: ReleaseE ) } -const FadeInCard = motion(Card) +const FadeInCard = motion.create(Card) export const ReleaseActivityListItem = memo( ({ event, diff --git a/packages/sanity/src/core/releases/tool/detail/ReleaseDashboardActivityPanel.tsx b/packages/sanity/src/core/releases/tool/detail/ReleaseDashboardActivityPanel.tsx index 6332ce41359..b59123e2d43 100644 --- a/packages/sanity/src/core/releases/tool/detail/ReleaseDashboardActivityPanel.tsx +++ b/packages/sanity/src/core/releases/tool/detail/ReleaseDashboardActivityPanel.tsx @@ -19,7 +19,7 @@ interface ReleaseDashboardActivityPanelProps { release: ReleaseDocument show: boolean } -const MotionFlex = motion(Flex) +const MotionFlex = motion.create(Flex) const FillHeight = styled.div` height: 100%; display: flex; diff --git a/packages/sanity/src/core/releases/tool/overview/ReleasesOverview.tsx b/packages/sanity/src/core/releases/tool/overview/ReleasesOverview.tsx index 017de253144..2262050eb1e 100644 --- a/packages/sanity/src/core/releases/tool/overview/ReleasesOverview.tsx +++ b/packages/sanity/src/core/releases/tool/overview/ReleasesOverview.tsx @@ -32,8 +32,8 @@ import {DateFilterButton, ReleaseCalendarFilterDay} from './ReleaseCalendarFilte import {releasesOverviewColumnDefs} from './ReleasesOverviewColumnDefs' import {useTimezoneAdjustedDateTimeRange} from './useTimezoneAdjustedDateTimeRange' -const MotionStudioButton = motion(StudioButton) -const MotionUiButton = motion(Button) +const MotionStudioButton = motion.create(StudioButton) +const MotionUiButton = motion.create(Button) const DATE_SEARCH_PARAM_VALUE_FORMAT = 'yyyy-MM-dd' diff --git a/packages/sanity/src/structure/panes/document/timeline/events/EventsTimeline.tsx b/packages/sanity/src/structure/panes/document/timeline/events/EventsTimeline.tsx index b82a0df1627..54f5d18a73d 100644 --- a/packages/sanity/src/structure/panes/document/timeline/events/EventsTimeline.tsx +++ b/packages/sanity/src/structure/panes/document/timeline/events/EventsTimeline.tsx @@ -31,7 +31,7 @@ interface TimelineProps { listMaxHeight?: string } -const TimelineItemWrapper = motion(Box) +const TimelineItemWrapper = motion.create(Box) const CHILDREN_ITEMS_VARIANTS: Variants = { initial: { opacity: 0,