Skip to content

Commit d5ce01a

Browse files
committed
Revert "fix(website): missing suspense"
This reverts commit dbfa94a.
1 parent dbfa94a commit d5ce01a

File tree

3 files changed

+19
-28
lines changed

3 files changed

+19
-28
lines changed

apps/website/src/components/Header.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import menuIcon from "../assets/boxicons/bx-menu.svg?raw";
1111
import { LocaleContext } from "..";
1212
import { useTranslation } from "react-i18next";
1313
import { swapLocaleInUrl } from "../i18n";
14-
import { Suspense } from "preact/compat";
1514

1615
interface HeaderLink {
1716
url: string;
@@ -79,9 +78,7 @@ export function Header(props: {repoStargazersCount: number}) {
7978
/>
8079
</div>
8180

82-
<Suspense fallback={<div class="loading-screen">Loading...</div>}>
83-
<DownloadButton />
84-
</Suspense>
81+
<DownloadButton />
8582

8683
</div>
8784
</header>

apps/website/src/index.tsx

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,30 @@ import { default as i18next, changeLanguage } from 'i18next';
1313
import { extractLocaleFromUrl, LOCALES, mapLocale } from './i18n';
1414
import HttpApi from 'i18next-http-backend';
1515
import { initReactI18next } from "react-i18next";
16-
import { Suspense } from 'preact/compat';
1716

1817
export const LocaleContext = createContext('en');
1918

2019
export function App(props: {repoStargazersCount: number}) {
2120
return (
22-
<LocationProvider>
23-
<LocaleProvider>
24-
<Suspense fallback={<div class="loading-screen">Loading...</div>}>
25-
<Header repoStargazersCount={props.repoStargazersCount} />
26-
<main>
27-
<Router>
28-
<Route path="/" component={Home} />
29-
<Route path="/get-started" component={GetStarted} />
30-
<Route path="/support-us" component={SupportUs} />
21+
<LocationProvider>
22+
<LocaleProvider>
23+
<Header repoStargazersCount={props.repoStargazersCount} />
24+
<main>
25+
<Router>
26+
<Route path="/" component={Home} />
27+
<Route path="/get-started" component={GetStarted} />
28+
<Route path="/support-us" component={SupportUs} />
3129

32-
<Route path="/:locale:/" component={Home} />
33-
<Route path="/:locale:/get-started" component={GetStarted} />
34-
<Route path="/:locale:/support-us" component={SupportUs} />
30+
<Route path="/:locale:/" component={Home} />
31+
<Route path="/:locale:/get-started" component={GetStarted} />
32+
<Route path="/:locale:/support-us" component={SupportUs} />
3533

36-
<Route default component={NotFound} />
37-
</Router>
38-
</main>
39-
<Footer />
40-
</Suspense>
41-
</LocaleProvider>
42-
</LocationProvider>
34+
<Route default component={NotFound} />
35+
</Router>
36+
</main>
37+
<Footer />
38+
</LocaleProvider>
39+
</LocationProvider>
4340
);
4441
}
4542

apps/website/src/pages/Home/index.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ import presentationIcon from "../../assets/boxicons/bx-slideshow.svg?raw";
3333
import { getPlatform } from '../../download-helper.js';
3434
import { useEffect, useState } from 'preact/hooks';
3535
import { Trans, useTranslation } from 'react-i18next';
36-
import { Suspense } from 'preact/compat';
3736

3837
export function Home() {
3938
usePageTitle("");
@@ -80,9 +79,7 @@ function HeroSection() {
8079
<p>{t("hero_section.subtitle")}</p>
8180

8281
<div className="download-wrapper">
83-
<Suspense fallback={<div class="loading-screen">Loading...</div>}>
84-
<DownloadButton big />
85-
</Suspense>
82+
<DownloadButton big />
8683
<Button href="./get-started/" className="mobile-only" text={t("hero_section.get_started")} />
8784
<div className="additional-options">
8885
<Button iconSvg={gitHubIcon} outline text={t("hero_section.github")} href="https://github.com/TriliumNext/Trilium/" openExternally />

0 commit comments

Comments
 (0)