mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 15:49:00 +02:00
chore(website): arch & platform not properly rendered statically
This commit is contained in:
parent
0be9310450
commit
e860b7aa32
@ -1,4 +1,4 @@
|
|||||||
import { useState } from "preact/hooks";
|
import { useLayoutEffect, useState } from "preact/hooks";
|
||||||
import Card from "../../components/Card.js";
|
import Card from "../../components/Card.js";
|
||||||
import Section from "../../components/Section.js";
|
import Section from "../../components/Section.js";
|
||||||
import { App, Architecture, buildDownloadUrl, downloadMatrix, DownloadMatrixEntry, getArchitecture, getPlatform, Platform } from "../../download-helper.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" };
|
import packageJson from "../../../../../package.json" with { type: "json" };
|
||||||
|
|
||||||
export default function DownloadPage() {
|
export default function DownloadPage() {
|
||||||
const [ currentArch, setCurrentArch ] = useState(getArchitecture() ?? "x64");
|
const [ currentArch, setCurrentArch ] = useState<Architecture>("x64");
|
||||||
const userPlatform = getPlatform();
|
const [ userPlatform, setUserPlatform ] = useState<Platform>();
|
||||||
|
|
||||||
|
useLayoutEffect(() => {
|
||||||
|
setCurrentArch(getArchitecture() ?? "x64");
|
||||||
|
setUserPlatform(getPlatform() ?? "windows");
|
||||||
|
}, []);
|
||||||
|
|
||||||
usePageTitle("Get started");
|
usePageTitle("Get started");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user