1
+ import { Suspense } from "react"
1
2
import { pick } from "lodash"
3
+ import dynamic from "next/dynamic"
2
4
import {
3
5
getMessages ,
4
6
getTranslations ,
@@ -13,6 +15,7 @@ import { Image } from "@/components/Image"
13
15
import MainArticle from "@/components/MainArticle"
14
16
import { ButtonLink } from "@/components/ui/buttons/Button"
15
17
import { LinkBox , LinkOverlay } from "@/components/ui/link-box"
18
+ import { Skeleton } from "@/components/ui/skeleton"
16
19
import { Tabs , TabsContent , TabsList , TabsTrigger } from "@/components/ui/tabs"
17
20
18
21
import { cn } from "@/lib/utils/cn"
@@ -27,14 +30,17 @@ import CountDown from "./_components/CountDown"
27
30
import { adoptionCards , adoptionStyles } from "./_components/data"
28
31
import InnovationSwiper from "./_components/InnovationSwiper"
29
32
import Stories from "./_components/Stories"
30
- import TenYearGlobe from "./_components/TenYearGlobe"
31
33
import TenYearHero from "./_components/TenYearHero"
32
34
import { parseStoryDates } from "./_components/utils"
33
35
34
36
import { fetch10YearEvents } from "@/lib/api/fetch10YearEvents"
35
37
import { fetch10YearStories } from "@/lib/api/fetch10YearStories"
36
38
import TenYearLogo from "@/public/images/10-year-anniversary/10-year-logo.png"
37
39
40
+ const TenYearGlobe = dynamic ( ( ) => import ( "./_components/TenYearGlobe" ) , {
41
+ ssr : false ,
42
+ } )
43
+
38
44
// In seconds
39
45
const REVALIDATE_TIME = BASE_TIME_UNIT * 1
40
46
@@ -98,16 +104,22 @@ const Page = async ({ params }: { params: Promise<{ locale: Lang }> }) => {
98
104
local event or start your own celebration.
99
105
</ p >
100
106
</ div >
101
- < div >
102
- < TenYearGlobe
103
- events = { Object . values ( fetched10YearEvents ) . flatMap ( ( region ) =>
104
- region . events . map ( ( event ) => ( {
105
- ...event ,
106
- lat : Number ( event . lat ) ,
107
- lng : Number ( event . lng ) ,
108
- } ) )
109
- ) }
110
- />
107
+ < div className = "h-[max(fit,260px)] sm:h-[400px] md:h-[500px] lg:h-[600px]" >
108
+ < Suspense
109
+ fallback = {
110
+ < Skeleton className = "mx-auto aspect-square h-full rounded-full bg-primary/20 blur-2xl" />
111
+ }
112
+ >
113
+ < TenYearGlobe
114
+ events = { Object . values ( fetched10YearEvents ) . flatMap ( ( region ) =>
115
+ region . events . map ( ( event ) => ( {
116
+ ...event ,
117
+ lat : Number ( event . lat ) ,
118
+ lng : Number ( event . lng ) ,
119
+ } ) )
120
+ ) }
121
+ />
122
+ </ Suspense >
111
123
</ div >
112
124
</ div >
113
125
</ div >
0 commit comments