-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathnews.tsx
76 lines (73 loc) · 2.07 KB
/
news.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import Navbar, { NavbarProps } from "@/components/Navbar";
import NewsCard from "@/components/NewsCard";
import createClient from "@/lib/cmsClient";
import styles from "@/styles/news.module.css";
import { readItems } from "@directus/sdk";
import { GetStaticProps } from "next";
import Head from "next/head";
export const getStaticProps: GetStaticProps<NewsPageProps> = async () => {
const client = createClient();
const links = await client.request(readItems("NavigationLink"));
return {
props: {
navBar: {
links,
},
},
};
};
type NewsPageProps = {
navBar: NavbarProps;
};
export default function News({ navBar }: NewsPageProps) {
return (
<>
<Head>
<title>Satakuntalainen Osakunta</title>
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
</Head>
<Navbar links={navBar.links} />
<header className="header">
<div className="headerContainer">
<h1>Uutiset</h1>
<p className="headerText">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quidem odit
distinctio, ullam doloremque provident voluptas illo quaerat ex
saepe voluptate reiciendis rerum fuga obcaecati esse sit cum maxime,
dolorem facilis?
</p>
</div>
</header>
<main className="main">
<div className={styles.newsContainer}>
<NewsCard
title="Title"
date="01.08.2024"
description="test"
href=""
/>
<NewsCard
title="Title"
date="01.08.2024"
description="test"
href=""
/>
<NewsCard
title="Title"
date="01.08.2024"
description="test"
href=""
/>
<NewsCard
title="Title"
date="01.08.2024"
description="test"
href=""
/>
</div>
</main>
<footer className="footer" />
</>
);
}