Skip to content

Commit

Permalink
Rename loadPagesPage to loadPage
Browse files Browse the repository at this point in the history
  • Loading branch information
smrtrfszm committed Mar 26, 2024
1 parent 9e18128 commit 350ddd9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import Layout from '~/components/Layout'
import Title from '~/components/Title'
import '~/scss/global.scss'
import { loadHomePage } from './data/home.data'
import { loadPagesPage } from './data/pages.data'
import { loadPage } from './data/pages.data'
import { loadPost } from './data/post.data'
import { loadSearchPage } from './data/search.data'

Expand All @@ -25,7 +25,7 @@ const ROUTES: RouteDefinition[] = [
{
path: '/pages/:slug',
component: lazy(() => import('~/pages/Pages')),
load: loadPagesPage,
load: loadPage,
},
{
path: '/search',
Expand Down
2 changes: 1 addition & 1 deletion src/data/pages.data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ export const queryPageByID = cache(async (slug: string): Promise<Page> => {
return response.page
}, 'Pages.queryPageByID')

export const loadPagesPage: RouteLoadFunc = ({ params }) => {
export const loadPage: RouteLoadFunc = ({ params }) => {
void queryPageByID(params.slug)
}

0 comments on commit 350ddd9

Please sign in to comment.