File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ interface RotatingEarthProps {
1212 scrollProgress ?: MotionValue < number >
1313}
1414
15+ import globeData from "../../../public/globe-data.json"
16+
1517export default function RotatingEarth ( {
1618 width = 800 ,
1719 height = 600 ,
@@ -134,10 +136,8 @@ export default function RotatingEarth({
134136 try {
135137 setIsLoading ( true )
136138
137- const response = await fetch ( "/globe-data.json" )
138- if ( ! response . ok ) throw new Error ( "Failed to load land data" )
139-
140- const payload = await response . json ( )
139+ // Statically use imported JSON instead of fetch() to avoid Vercel 404s
140+ const payload = globeData as any
141141 landFeatures = payload . landFeatures
142142
143143 payload . dots . forEach ( ( dot : [ number , number ] ) => {
@@ -146,7 +146,8 @@ export default function RotatingEarth({
146146
147147 render ( )
148148 setIsLoading ( false )
149- } catch {
149+ } catch ( err ) {
150+ console . error ( err ) ;
150151 setError ( "Failed to load land map data" )
151152 setIsLoading ( false )
152153 }
You can’t perform that action at this time.
0 commit comments