fix(website): screenshot not loading due to SSR

This commit is contained in:
Elian Doran 2025-09-28 00:36:21 +03:00
parent c25f783980
commit bd2eb6fdbb
No known key found for this signature in database

View File

@ -54,6 +54,7 @@ function HeroSection() {
let screenshotUrl: string | null = null; let screenshotUrl: string | null = null;
const colorScheme = useColorScheme(); const colorScheme = useColorScheme();
if (colorScheme) {
switch (platform) { switch (platform) {
case "macos": case "macos":
screenshotUrl = `/screenshot_desktop_mac_${colorScheme}.webp`; screenshotUrl = `/screenshot_desktop_mac_${colorScheme}.webp`;
@ -65,6 +66,7 @@ function HeroSection() {
screenshotUrl = `/screenshot_desktop_win_${colorScheme}.webp`; screenshotUrl = `/screenshot_desktop_win_${colorScheme}.webp`;
break; break;
} }
}
return ( return (
<Section className="hero-section"> <Section className="hero-section">