Skip to content

Commit d5b0868

Browse files
committed
build error fixed
1 parent 9bc831e commit d5b0868

4 files changed

Lines changed: 46 additions & 62 deletions

File tree

pages/api/restricted.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

pages/ciurseois.jsx

Lines changed: 41 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,56 @@
11
import Head from "next/head";
22
import Link from "next/link";
3-
import { getDatabase } from "../lib/notion";
4-
import { Text } from "./[id].js";
3+
import { getDatabase } from "../lib/notion";
4+
import { Text } from "./[id].js";
55

6-
export const databaseId = process.env.NOTION_DATABASE_ID;
76

8-
export default function miurseois({ posts }) {
9-
return (
7+
8+
export const databaseId = process.env.NOTION_DATABASE_ID;
9+
10+
export default function miurseois({ posts }) {
11+
return (
1012
<>
11-
<div className="announcements-container">
12-
<ol className="announcements">
13-
{posts.map((post) => {
14-
const date = new Date(post.last_edited_time).toLocaleString(
13+
14+
<div className="announcements-container">
15+
16+
<ol className="announcements">
17+
{posts.map((post) => {
18+
const date = new Date(post.last_edited_time).toLocaleString(
1519
"en-US",
1620
{
1721
month: "short",
1822
day: "2-digit",
1923
year: "numeric",
20-
}
21-
);
22-
return (
23-
<li className="post" key={post.id}>
24-
<h3 className="postTitle">
25-
<Link href={`/${post.id}`}>
26-
<Text text={post.properties.Name.title} />
27-
</Link>
28-
</h3>
29-
30-
<p className="postDescription">{date}</p>
31-
<Link className="readMoreLink" href={`/${post.id}`}>
32-
Read more →{" "}
33-
</Link>
34-
</li>
35-
);
36-
})}
37-
</ol>
38-
</div>
39-
</>
40-
);
41-
}
24+
}
25+
);
26+
return (
27+
28+
<li className="post"key={post.id} >
29+
<h3 className="postTitle">
30+
<Link href={`/${post.id}`}>
31+
<Text text={post.properties.Name.title} />
32+
</Link>
33+
</h3>
4234

35+
<p className="postDescription">{date}</p>
36+
<Link className="readMoreLink" href={`/${post.id}`}>Read more → </Link>
37+
</li>
38+
);
39+
})}
40+
</ol>
41+
42+
</div>
43+
44+
</>
45+
);
46+
}
4347
export const getStaticProps = async () => {
4448
const database = await getDatabase(databaseId);
45-
4649
return {
4750
props: {
48-
posts: database,
49-
},
50-
revalidate: 1,
51-
};
52-
};
51+
posts: database,
52+
},
53+
revalidate: 1,
54+
55+
};
56+
};

pages/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export default function Home() {
2727
<h1 className="headline">Courses Portal</h1>
2828
<p className="align-center">
2929
You must login with Discord to access Tech Optimum courses. Please
30-
click <a href="/login">here</a> to login.
30+
click <Link href="/login">here</Link> to login.
3131
</p>
3232
</div>
3333
</div>
@@ -76,17 +76,17 @@ export default function Home() {
7676
<p className="c-soon">More courses coming soon.</p>
7777

7878
<p className="report-bugs-home">
79-
Return to our <a href="https://techoptimum.org">Main Website</a>
79+
Return to our <Link href="https://techoptimum.org">Main Website</Link>
8080
<br />
8181
<br />
8282
Report course errors to our{" "}
83-
<a
83+
<Link
8484
rel="noreferrer"
8585
target={"_blank"}
8686
href="https://discord.gg/HpRfm7kp3U"
8787
>
8888
Discord Server
89-
</a>
89+
</Link>
9090
</p>
9191
</main>
9292
</div>

pages/login.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import Login from "../components/Login";
1+
import Login from "../components/login";
22

33
import React from "react";
44

0 commit comments

Comments
 (0)