From e860b7aa32a26e55aee50d00a66a8566718e7993 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Tue, 30 Sep 2025 21:08:19 +0300 Subject: [PATCH] chore(website): arch & platform not properly rendered statically --- apps/website/src/pages/GetStarted/get-started.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/website/src/pages/GetStarted/get-started.tsx b/apps/website/src/pages/GetStarted/get-started.tsx index 2139fe928..39027c55d 100644 --- a/apps/website/src/pages/GetStarted/get-started.tsx +++ b/apps/website/src/pages/GetStarted/get-started.tsx @@ -1,4 +1,4 @@ -import { useState } from "preact/hooks"; +import { useLayoutEffect, useState } from "preact/hooks"; import Card from "../../components/Card.js"; import Section from "../../components/Section.js"; import { App, Architecture, buildDownloadUrl, downloadMatrix, DownloadMatrixEntry, getArchitecture, getPlatform, Platform } from "../../download-helper.js"; @@ -10,8 +10,13 @@ import "./get-started.css"; import packageJson from "../../../../../package.json" with { type: "json" }; export default function DownloadPage() { - const [ currentArch, setCurrentArch ] = useState(getArchitecture() ?? "x64"); - const userPlatform = getPlatform(); + const [ currentArch, setCurrentArch ] = useState("x64"); + const [ userPlatform, setUserPlatform ] = useState(); + + useLayoutEffect(() => { + setCurrentArch(getArchitecture() ?? "x64"); + setUserPlatform(getPlatform() ?? "windows"); + }, []); usePageTitle("Get started");