Skip to content

Commit

Permalink
fix(frontend/blog): 🐛 Allow for adding new content after build
Browse files Browse the repository at this point in the history
  • Loading branch information
Nudelsuppe42 committed Sep 28, 2024
1 parent 54efcde commit 4c20845
Showing 1 changed file with 14 additions and 7 deletions.
21 changes: 14 additions & 7 deletions apps/frontend/src/pages/blog/[slug]/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
/* eslint-disable no-undef */

import { Box, Skeleton } from '@mantine/core';

import Page from '@/components/Page';
import thumbnail from '@/public/images/thumbnails/newsletter.png';
import classes from '@/styles/blog.module.css';
import highlightClasses from '@/styles/highlight.module.css';
import fetcher from '@/utils/Fetcher';
import { Box } from '@mantine/core';
import hljs from 'highlight.js';
import { NextPage } from 'next';
import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
Expand All @@ -15,16 +17,21 @@ const Blog: NextPage = ({ data }: any) => {
hljs.initHighlighting();
}, []);

if (!data)
if (data)
return (
<Page
head={{
title: 'huh',
image: '',
title: 'BuildTheEarth Blog',
image: thumbnail,
}}
>
idk
<pre>{JSON.stringify(data, null, 2)}</pre>
<Skeleton h={60} w="50%" radius="xl" />
<Skeleton h={14} mt={21} w="100%" radius="xl" />
<Skeleton h={14} mt={16} w="85%" radius="xl" />
<Skeleton h={14} mt={20} w="100%" radius="xl" />
<Skeleton h={14} mt={16} w="100%" radius="xl" />
<Skeleton h={14} mt={16} w="100%" radius="xl" />
<Skeleton h={14} mt={16} w="30%" radius="xl" />
</Page>
);

Expand Down Expand Up @@ -64,6 +71,6 @@ export async function getStaticPaths() {
slug: blogPost.slug,
},
})),
fallback: false,
fallback: true,
};
}

0 comments on commit 4c20845

Please sign in to comment.