Skip to content

Commit b93e3e2

Browse files
committed
chore: tiny cleanup
1 parent 6f38d13 commit b93e3e2

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

apps/site/components/withBlogCrossLinks.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@ const WithBlogCrossLinks: FC = () => {
99
const { pathname } = getClientContext();
1010

1111
// Extracts from the static URL the components used for the Blog Post slug
12-
const [, , category, postname] = pathname.split('/');
12+
const [, , category, postname] = pathname.split('/') as [
13+
unknown,
14+
unknown,
15+
BlogCategory,
16+
string,
17+
];
1318

14-
const { posts } = getBlogData(category as BlogCategory);
19+
const { posts } = getBlogData(category);
1520

1621
const currentItem = posts.findIndex(
1722
({ slug }) => slug === `/blog/${category}/${postname}`

0 commit comments

Comments
 (0)