Skip to content

Commit

Permalink
fix: nextjs call root [slug] will undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
Innei committed Jul 9, 2023
1 parent b78a1ac commit ac97006
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/app/(page-detail)/[slug]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,9 @@ export default async (props: NextPageParams<PageParams>) => {
const {
params: { slug },
} = props

if (!slug) return notFound()
const query = queries.page.bySlug(slug)
// const queryKey = query.queryKey
const data = await getQueryClient()
.fetchQuery(query)
.catch((error) => {
Expand Down

0 comments on commit ac97006

Please sign in to comment.