Skip to content

Commit 7d7bfaf

Browse files
committed
Fix case sensitivity for route assets
1 parent a40c69b commit 7d7bfaf

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

src/components/JourneyPlayer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export function JourneyPlayer({
3232
const [currentFrame, setCurrentFrame] = useState(1);
3333
const [activePOI, setActivePOI] = useState<POI | null>(null);
3434
const [activePOIIndex, setActivePOIIndex] = useState<number>(-1);
35-
const routeSlug = assetFolder?.split("/")[0] || "siliguri-Kurseong-darjeeling";
35+
const routeSlug = (assetFolder?.split("/")[0] || "siliguri-kurseong-darjeeling").toLowerCase();
3636

3737
// Device-specific frame counts from route data
3838
const totalFrames = isMobile ? mobileFrames : desktopFrames;

src/components/RouteClient.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,13 +120,13 @@ export function RouteClient({ slug, tid: initialTid }: RouteClientProps) {
120120
const loadConfig = async () => {
121121
const devicePath = isMobile ? "mobile" : "desktop";
122122
try {
123-
const response = await fetch(getAssetPath(`/routes/${slug}/${devicePath}/meta/config.json`));
123+
const response = await fetch(getAssetPath(`/routes/${slug.toLowerCase()}/${devicePath}/meta/config.json`));
124124
if (response.ok) {
125125
const config = await response.json();
126126
setRouteConfig(config);
127127
} else {
128128
// Fallback to legacy path if new path doesn't exist yet
129-
const fallbackResponse = await fetch(getAssetPath(`/routes/${slug}/meta/config.json`));
129+
const fallbackResponse = await fetch(getAssetPath(`/routes/${slug.toLowerCase()}/meta/config.json`));
130130
if (fallbackResponse.ok) {
131131
const config = await fallbackResponse.json();
132132
setRouteConfig(config);

0 commit comments

Comments
 (0)