-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpage.tsx
45 lines (41 loc) · 1.14 KB
/
page.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
import css from "./GuideVersionSelection.module.css";
import Link from "next/link";
import {
GuideVersion,
guideVersions,
} from "../build-data/GuideVersionIndex.ts";
import { Metadata } from "next";
export const metadata: Metadata = {
title: "AE2 Players Guide",
alternates: {
canonical: "/",
},
};
function GuideVersion({ version }: { version: GuideVersion }) {
const lastUpdate = new Date(version.generated);
return (
<Link href={"/" + version.slug + "/index"} className={css.version}>
<div className={css.minecraftLogo}>
<span>{version.gameVersion}</span>
</div>
<h2>
Applied Energistics 2 for Minecraft {version.gameVersion}
{version.development ? " (Development)" : null}
</h2>
<div>Last Updated: {lastUpdate.toLocaleDateString()}</div>
</Link>
);
}
function GuideVersionSelection() {
return (
<div className={css.root}>
<h1>Guide Versions</h1>
{guideVersions
.filter((gv) => !gv.development)
.map((version) => (
<GuideVersion key={version.slug} version={version} />
))}
</div>
);
}
export default GuideVersionSelection;