Remove unnecessary releases. (#90)

This commit is contained in:
Dessalines 2022-03-07 21:13:37 +00:00 committed by GitHub
parent 30b847062c
commit 7f518c9035
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 49 deletions

View file

@ -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 => {

View file

@ -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<any, any> {
constructor(props: any, context: any) {
super(props, context);
}
componentDidMount() {
if (isBrowser()) {
window.scrollTo(0, 0);
}
}
render() {
return (
<div>
<Helmet title={title}>
<meta property={"title"} content={title} />
</Helmet>
<div class="container">
<div dangerouslySetInnerHTML={mdToHtml(releases_md)} />
</div>
</div>
);
}
}

View file

@ -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,