Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(website): arch & platform not properly rendered statically
Elian Dorane860b7aa32a2
diff --git a/apps/website/src/pages/GetStarted/get-started.tsx b/apps/website/src/pages/GetStarted/get-started.tsxindex 2139fe9280..39027c55d2 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<Architecture>("x64");+ const [ userPlatform, setUserPlatform ] = useState<Platform>();++ useLayoutEffect(() => {+ setCurrentArch(getArchitecture() ?? "x64");+ setUserPlatform(getPlatform() ?? "windows");+ }, []);usePageTitle("Get started");