Skip to content

Commit

Permalink
⚡️ Trying dynamic routes
Browse files Browse the repository at this point in the history
  • Loading branch information
ThijmenGThN committed Dec 16, 2023
1 parent 11ce4fe commit f71c9e7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/[locale]/[category]/[post]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ import Header from "@/components/Header"

import { ArrowUturnLeftIcon } from "@heroicons/react/20/solid"

export const dynamic = 'force-dynamic'

export default async function Page({ params }: { params: { post: string } }) {
const post = await pb.collection('posts').getFirstListItem(`slug~"${params.post}"`)
const category = await pb.collection('categories').getOne(post.category)
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/[category]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import Header from "@/components/Header"

import { ArrowUturnLeftIcon } from "@heroicons/react/20/solid"

export const dynamic = 'force-dynamic'

export default async function Page({ params }: { params: { category: string } }) {

const category = await pb.collection('categories').getFirstListItem(`name~"${params.category}"`)
Expand Down
2 changes: 2 additions & 0 deletions app/[locale]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import pb from "@/helpers/pocketbase"
import Search from "@/components/Search"
import Header from "@/components/Header"

export const dynamic = 'force-dynamic'

export default async function Page() {

const categories = await pb.collection('categories').getFullList({
Expand Down

0 comments on commit f71c9e7

Please sign in to comment.