File tree Expand file tree Collapse file tree 2 files changed +5
-8
lines changed
Expand file tree Collapse file tree 2 files changed +5
-8
lines changed Original file line number Diff line number Diff line change @@ -13,8 +13,6 @@ function getPosts() {
1313
1414const posts = getPosts ( ) ;
1515
16- export const provideBlogCategories = cache ( ( ) => blogData . categories ) ;
17-
1816export const provideBlogPosts = cache (
1917 ( category : BlogCategory ) : BlogPostsRSC => {
2018 const categoryPosts = posts
Original file line number Diff line number Diff line change 11'use strict' ;
22
3- import {
4- provideBlogCategories ,
5- provideBlogPosts ,
6- } from './next-data/providers/blogData' ;
3+ import { blogData } from '@/next.json.mjs' ;
4+
5+ import { provideBlogPosts } from './next-data/providers/blogData' ;
76import { BASE_PATH , BASE_URL } from './next.constants.mjs' ;
87import { siteConfig } from './next.json.mjs' ;
98import { defaultLocale } from './next.locales.mjs' ;
@@ -31,9 +30,9 @@ export const IGNORED_ROUTES = [
3130 */
3231export const DYNAMIC_ROUTES = new Map ( [
3332 // Provides Routes for all Blog Categories
34- ...provideBlogCategories ( ) . map ( c => [ `blog/${ c } ` , 'blog-category' ] ) ,
33+ ...blogData . categories . map ( c => [ `blog/${ c } ` , 'blog-category' ] ) ,
3534 // Provides Routes for all Blog Categories w/ Pagination
36- ...provideBlogCategories ( )
35+ ...blogData . categories
3736 // retrieves the amount of pages for each blog category
3837 . map ( c => [ c , provideBlogPosts ( c ) . pagination . pages ] )
3938 // creates a numeric array for each page and define a pathname for
You can’t perform that action at this time.
0 commit comments