From 3f5452ab924a780eb3adcfd5e4c7cdb8a705e8b9 Mon Sep 17 00:00:00 2001 From: Dessalines Date: Mon, 7 Mar 2022 15:43:25 -0500 Subject: [PATCH] Remove unnecessary releases. --- generate_translations.mjs | 11 ---------- src/shared/components/releases.tsx | 32 ------------------------------ src/shared/routes.ts | 6 ------ 3 files changed, 49 deletions(-) delete mode 100644 src/shared/components/releases.tsx diff --git a/generate_translations.mjs b/generate_translations.mjs index 5d1ffd9..2e2278d 100644 --- a/generate_translations.mjs +++ b/generate_translations.mjs @@ -41,17 +41,6 @@ try { console.error(err); } -// Write the releases file -try { - const markdown = await (await fetch(releasesLocation)).text(); - let data = `export const releases_md = \n `; - data += JSON.stringify(markdown, null, 2) + ";"; - const target = outDir + "releases.ts"; - fs.writeFileSync(target, data); -} catch (err) { - console.error(err); -} - // Write the translations fs.readdir(translationDir, (_err, files) => { files.forEach(filename => { diff --git a/src/shared/components/releases.tsx b/src/shared/components/releases.tsx deleted file mode 100644 index 25edb9f..0000000 --- a/src/shared/components/releases.tsx +++ /dev/null @@ -1,32 +0,0 @@ -import { Component } from "inferno"; -import { Helmet } from "inferno-helmet"; -import { i18n } from "../i18next"; -import { releases_md } from "../translations/releases"; -import { mdToHtml, isBrowser } from "../utils"; - -const title = i18n.t("releases"); - -export class Releases extends Component { - constructor(props: any, context: any) { - super(props, context); - } - - componentDidMount() { - if (isBrowser()) { - window.scrollTo(0, 0); - } - } - - render() { - return ( -
- - - -
-
-
-
- ); - } -} diff --git a/src/shared/routes.ts b/src/shared/routes.ts index 8d664a4..d1a6192 100644 --- a/src/shared/routes.ts +++ b/src/shared/routes.ts @@ -7,7 +7,6 @@ import { Donate } from "./components/donate"; import { About } from "./components/about"; import { News } from "./components/news"; import { NewsItem } from "./components/news-item"; -import { Releases } from "./components/releases"; export const routes: IRouteProps[] = [ { @@ -25,11 +24,6 @@ export const routes: IRouteProps[] = [ exact: true, component: News, }, - { - path: `/releases`, - exact: true, - component: Releases, - }, { path: `/news/:title`, exact: true,