Skip to content

Commit

Permalink
chore: more cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
ovflowd committed Nov 6, 2023
1 parent b50adc0 commit 009d051
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions hooks/useBlogData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@ import { useCallback, useMemo } from 'react';

import { usePathname } from '@/navigation.mjs';
import blogData from '@/public/blog-posts-data.json';
import type { BlogData } from '@/types';

export const useBlogData = () => {
const pathname = usePathname();

const { posts, pagination, categories } = blogData as BlogData;
const { posts, pagination, categories } = blogData;

const getPostsByCategory = useCallback(
(category: string) => posts.filter(post => post.category === category),
Expand Down
6 changes: 3 additions & 3 deletions next.constants.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ export const DEFAULT_METADATA = {
title: siteConfig.twitter.title,
creator: siteConfig.twitter.username,
images: {
url: `${siteConfig.twitter.img}`,
url: siteConfig.twitter.img,
alt: siteConfig.twitter.imgAlt,
},
},
Expand All @@ -170,8 +170,8 @@ export const DEFAULT_METADATA = {
'application/rss+xml': 'https://nodejs.org/en/feed/blog.xml',
},
},
icons: { icon: `${siteConfig.favicon}` },
openGraph: { images: `${siteConfig.twitter.img}` },
icons: { icon: siteConfig.favicon },
openGraph: { images: siteConfig.twitter.img },
};

/**
Expand Down

0 comments on commit 009d051

Please sign in to comment.