Skip to content

Commit

Permalink
refactor(index): dynamically import Lottie component to improve SSR c…
Browse files Browse the repository at this point in the history
…ompatibility
  • Loading branch information
johnlindquist committed Dec 28, 2024
1 parent 8d0acd6 commit 98c1248
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion apps/scriptkit/src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as React from 'react'
import {FunctionComponent} from 'react'
import Lottie from 'react-lottie-player'
import dynamic from 'next/dynamic'
import Link from 'next/link'
import {useRouter} from 'next/router'
import {readFileSync} from 'fs'
Expand Down Expand Up @@ -29,6 +29,10 @@ import SubscribeToConvertkitForm from 'components/subscribe-to-convertkit-form'
import {Favicon} from 'components/logo'
import Image from 'next/image'

const Lottie = dynamic(() => import('react-lottie-player'), {
ssr: false,
})

export type Release = {
name: string
browser_download_url: string
Expand Down

0 comments on commit 98c1248

Please sign in to comment.