mirror of
https://github.com/zadam/trilium.git
synced 2025-10-26 07:46:30 +01:00
fix(website/i18n): get started in download button not working
This commit is contained in:
@@ -3,14 +3,16 @@ import "./DownloadButton.css";
|
|||||||
import Button from "./Button.js";
|
import Button from "./Button.js";
|
||||||
import downloadIcon from "../assets/boxicons/bx-arrow-in-down-square-half.svg?raw";
|
import downloadIcon from "../assets/boxicons/bx-arrow-in-down-square-half.svg?raw";
|
||||||
import packageJson from "../../../../package.json" with { type: "json" };
|
import packageJson from "../../../../package.json" with { type: "json" };
|
||||||
import { useEffect, useState } from "preact/hooks";
|
import { useContext, useEffect, useState } from "preact/hooks";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { LocaleContext } from "../index.js";
|
||||||
|
|
||||||
interface DownloadButtonProps {
|
interface DownloadButtonProps {
|
||||||
big?: boolean;
|
big?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function DownloadButton({ big }: DownloadButtonProps) {
|
export default function DownloadButton({ big }: DownloadButtonProps) {
|
||||||
|
const locale = useContext(LocaleContext);
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [ recommendedDownload, setRecommendedDownload ] = useState<RecommendedDownload | null>();
|
const [ recommendedDownload, setRecommendedDownload ] = useState<RecommendedDownload | null>();
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -36,7 +38,7 @@ export default function DownloadButton({ big }: DownloadButtonProps) {
|
|||||||
) : (
|
) : (
|
||||||
<Button
|
<Button
|
||||||
className={`download-button desktop-only ${big ? "big" : ""}`}
|
className={`download-button desktop-only ${big ? "big" : ""}`}
|
||||||
href="/get-started/"
|
href={`/${locale}/get-started/`}
|
||||||
iconSvg={downloadIcon}
|
iconSvg={downloadIcon}
|
||||||
text={<>
|
text={<>
|
||||||
{t("download_now.text")}
|
{t("download_now.text")}
|
||||||
|
|||||||
Reference in New Issue
Block a user