Skip to content

Commit

Permalink
feat(article): improve ux (#258)
Browse files Browse the repository at this point in the history
* chore: remove generateMetadata method

Signed-off-by: Mateo Nunez <[email protected]>

* chore: add basic layout

Signed-off-by: Mateo Nunez <[email protected]>

* chore: suspense fix

Signed-off-by: Mateo Nunez <[email protected]>

* feat(article): dynamic import

Signed-off-by: Mateo Nunez <[email protected]>

---------

Signed-off-by: Mateo Nunez <[email protected]>
  • Loading branch information
mateonunez authored May 6, 2023
1 parent 40d27d2 commit faad8ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/blog/[slug]/page.jsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import s from 'styles/pages/blog/[slug].module.css';

import Article from 'components/articles';
import { cache } from 'react';
import dynamic from 'next/dynamic';
import { getArticle } from 'lib/articles/parser';
import config from 'lib/config';
import meta from 'lib/config/metadata.js';

const Article = dynamic(() => import('components/articles'), { ssr: false });

const fetchArticle = cache(async ({ slug }) => {
const { frontMatter, source } = await getArticle({ slug });
return { frontMatter, source };
Expand Down

1 comment on commit faad8ec

@vercel
Copy link

@vercel vercel bot commented on faad8ec May 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.