File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -46,6 +46,10 @@ async function getPublishedPostBySlug(slug: string) {
4646}
4747
4848export async function generateStaticParams ( ) {
49+ if ( process . env . CI === "true" ) {
50+ return [ ] ;
51+ }
52+
4953 try {
5054 const postSlugs = await db
5155 . select ( { slug : blogPosts . slug } )
@@ -54,8 +58,7 @@ export async function generateStaticParams() {
5458 . orderBy ( desc ( blogPosts . published_at ) ) ;
5559
5660 return postSlugs ;
57- } catch ( error ) {
58- console . error ( "Failed to generate update params" , error ) ;
61+ } catch {
5962 return [ ] ;
6063 }
6164}
Original file line number Diff line number Diff line change @@ -48,15 +48,18 @@ async function getProductBySlug(slug: string) {
4848}
4949
5050export async function generateStaticParams ( ) {
51+ if ( process . env . CI === "true" ) {
52+ return [ ] ;
53+ }
54+
5155 try {
5256 const productSlugs = await db
5357 . select ( { slug : products . slug } )
5458 . from ( products )
5559 . orderBy ( products . order_index ) ;
5660
5761 return productSlugs ;
58- } catch ( error ) {
59- console . error ( "Failed to generate product params" , error ) ;
62+ } catch {
6063 return [ ] ;
6164 }
6265}
Original file line number Diff line number Diff line change 11import AdminSidebar from "@/components/layout/AdminSidebar" ;
22import type { ReactNode } from "react" ;
33
4+ export const dynamic = "force-dynamic" ;
5+
46export default function AdminLayout ( {
57 children,
68} : Readonly < {
You can’t perform that action at this time.
0 commit comments