From d3c85be50ef891d9714da355130689ddf2f91346 Mon Sep 17 00:00:00 2001 From: Jelle Besseling Date: Thu, 1 Dec 2022 12:47:47 +0100 Subject: [PATCH] Stylized groups map --- frontend/public/images/roodnederland.svg | 257 +++++++++++++++++++++++ frontend/src/pages/index.tsx | 103 +++++---- 2 files changed, 323 insertions(+), 37 deletions(-) create mode 100644 frontend/public/images/roodnederland.svg diff --git a/frontend/public/images/roodnederland.svg b/frontend/public/images/roodnederland.svg new file mode 100644 index 0000000..eeae0dd --- /dev/null +++ b/frontend/public/images/roodnederland.svg @@ -0,0 +1,257 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/frontend/src/pages/index.tsx b/frontend/src/pages/index.tsx index 28f5ef8..426f120 100644 --- a/frontend/src/pages/index.tsx +++ b/frontend/src/pages/index.tsx @@ -1,17 +1,16 @@ -import Banner from '../components/Banner'; -import AboutUsShort from '../components/AboutUsShort'; -import dynamic from 'next/dynamic'; -import {useMemo} from 'react'; -import {fetchAfdelingen, fetchHome, fetchPosts} from '../utils/backend'; -import Afdeling from '../models/Afdeling'; -import HomeContent from '../models/HomeContent'; -import {Post, PostType} from '../models/Post'; -import Main from '../components/Main'; -import {revalidate} from '../utils/revalidate'; -import {GetStaticPropsResult} from 'next'; -import Subheader from '../components/Subheader'; -import EndlessPostsLoader from '../components/EndlessPostsLoader'; -import HeadPage from '../components/HeadPage'; +import Banner from "../components/Banner"; +import AboutUsShort from "../components/AboutUsShort"; +import { fetchAfdelingen, fetchHome, fetchPosts } from "../utils/backend"; +import Afdeling from "../models/Afdeling"; +import HomeContent from "../models/HomeContent"; +import { Post, PostType } from "../models/Post"; +import Main from "../components/Main"; +import { revalidate } from "../utils/revalidate"; +import { GetStaticPropsResult } from "next"; +import Subheader from "../components/Subheader"; +import EndlessPostsLoader from "../components/EndlessPostsLoader"; +import HeadPage from "../components/HeadPage"; +import AfdelingenTable from "../components/AfdelingenTable"; interface Props { homeContent: HomeContent; @@ -22,28 +21,58 @@ interface Props { export default function HomePage(props: Props) { const content = props.homeContent; - const AfdelingenMap = useMemo(() => dynamic(() => import('../components/AfdelingenMap'), {ssr: false}), []); - - return
- - -
- - -
-
- Laatste nieuws - + + return ( +
+ + +
+ +
+
+ + +
+ +
+ +
+
+ Laatste nieuws + +
+
+ Laatste inzendingen + +
Laatste inzendingen - +
- - - ; + + + ); } export async function getStaticProps(): Promise> { @@ -51,16 +80,16 @@ export async function getStaticProps(): Promise> { fetchHome(), fetchAfdelingen(), fetchPosts(PostType.NEWS, null, null, 1, 6, true), - fetchPosts(PostType.SUBMISSION, null, null, 1, 6, true) + fetchPosts(PostType.SUBMISSION, null, null, 1, 6, true), ]); - + return { props: { homeContent, afdelingen, latestNews: news.posts, - latestSubmissions: submissions.posts + latestSubmissions: submissions.posts, }, - revalidate + revalidate, }; -} \ No newline at end of file +}