Skip to content

Commit af668e1

Browse files
authored
flags-sdk examples: upgrade framer-motion and next (#1147)
- Update framer-motion package to motion to fix build errors - Update next - Avoid rendering two html/body tags in growthbook example closes #1146
1 parent 961f8b1 commit af668e1

40 files changed

+1335
-1166
lines changed

flags-sdk/bucket/components/product-detail-page/add-to-cart-button.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 { motion, AnimatePresence } from 'framer-motion'
3+
import { motion, AnimatePresence } from 'motion/react'
44

55
function Spinner() {
66
return (

flags-sdk/bucket/components/shopping-cart/shopping-cart-item.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import type { CartItem } from '@/components/utils/cart-types'
33
import { ShoppingBagIcon } from '@heroicons/react/24/outline'
44
import { colorToImage } from '@/components/utils/images'
5-
import { motion } from 'framer-motion'
5+
import { motion } from 'motion/react'
66
import Image from 'next/image'
77
import { ShoppingCartRemoveButton } from './shopping-cart-remove-button'
88
import Link from 'next/link'

flags-sdk/bucket/components/shopping-cart/shopping-cart-list.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 { AnimatePresence } from 'framer-motion'
3+
import { AnimatePresence } from 'motion/react'
44

55
export function ShoppingCartList({ children }: { children: React.ReactNode }) {
66
return (

flags-sdk/bucket/components/shopping-cart/shopping-cart-remove-button.tsx

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

33
import { removeFromCart } from '@/lib/actions'
4-
import { motion, AnimatePresence } from 'framer-motion'
4+
import { motion, AnimatePresence } from 'motion/react'
55
import { useState } from 'react'
66
import type { CartItem } from '@/components/utils/cart-types'
77

flags-sdk/bucket/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"@vercel/toolbar": "0.1.33",
2222
"clsx": "2.1.1",
2323
"flags": "^4.0.0",
24-
"framer-motion": "12.4.7",
24+
"motion": "12.17.0",
2525
"nanoid": "5.1.2",
26-
"next": "15.2.1-canary.4",
26+
"next": "15.4.0-canary.79",
2727
"react": "^19.0.0",
2828
"react-dom": "^19.0.0",
2929
"sonner": "2.0.1",

flags-sdk/bucket/pnpm-lock.yaml

Lines changed: 214 additions & 186 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flags-sdk/experimentation-statsig/components/product-detail-page/add-to-cart-button.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 { motion, AnimatePresence } from 'framer-motion'
3+
import { motion, AnimatePresence } from 'motion/react'
44

55
function Spinner() {
66
return (

flags-sdk/experimentation-statsig/components/shopping-cart/shopping-cart-item.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import type { CartItem } from '@/components/utils/cart-types'
33
import { ShoppingBagIcon } from '@heroicons/react/24/outline'
44
import { colorToImage } from '@/components/utils/images'
5-
import { motion } from 'framer-motion'
5+
import { motion } from 'motion/react'
66
import Image from 'next/image'
77
import { ShoppingCartRemoveButton } from './shopping-cart-remove-button'
88
import Link from 'next/link'

flags-sdk/experimentation-statsig/components/shopping-cart/shopping-cart-list.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 { AnimatePresence } from 'framer-motion'
3+
import { AnimatePresence } from 'motion/react'
44

55
export function ShoppingCartList({ children }: { children: React.ReactNode }) {
66
return (

flags-sdk/experimentation-statsig/components/shopping-cart/shopping-cart-remove-button.tsx

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

33
import { removeFromCart } from '@/lib/actions'
4-
import { motion, AnimatePresence } from 'framer-motion'
4+
import { motion, AnimatePresence } from 'motion/react'
55
import { useState } from 'react'
66
import type { CartItem } from '@/components/utils/cart-types'
77

0 commit comments

Comments
 (0)