Force dynamic rendering for Directus pages

- Homepage, events, and store pages now use force-dynamic
- This ensures fresh data is fetched at runtime
- Fixes build-time Directus fetch failures

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Jeff Emmett 2026-02-04 22:37:55 +00:00
parent fee96430ff
commit 586aa8de85
3 changed files with 9 additions and 3 deletions

View File

@ -8,7 +8,9 @@ export const metadata: Metadata = {
description: 'Upcoming exhibitions, workshops, and events with Katheryn Trenshaw', description: 'Upcoming exhibitions, workshops, and events with Katheryn Trenshaw',
}; };
export const revalidate = 60; // Force dynamic rendering to ensure fresh data from Directus
export const dynamic = 'force-dynamic';
export const revalidate = 0;
async function getEventsList(): Promise<{ upcoming: Event[]; past: Event[] }> { async function getEventsList(): Promise<{ upcoming: Event[]; past: Event[] }> {
try { try {

View File

@ -4,7 +4,9 @@ import { getArtworks, getEvents, getAssetUrl, Artwork, Event } from '@/lib/direc
import { ArtworkCard } from '@/components/artwork-card'; import { ArtworkCard } from '@/components/artwork-card';
import { WisdomWordsCarousel } from '@/components/wisdom-words-carousel'; import { WisdomWordsCarousel } from '@/components/wisdom-words-carousel';
export const revalidate = 60; // Force dynamic rendering to ensure fresh data from Directus
export const dynamic = 'force-dynamic';
export const revalidate = 0;
async function getFeaturedArtworks(): Promise<Artwork[]> { async function getFeaturedArtworks(): Promise<Artwork[]> {
try { try {

View File

@ -7,7 +7,9 @@ export const metadata: Metadata = {
description: 'Shop original artworks, prints, and unique pieces by Katheryn Trenshaw', description: 'Shop original artworks, prints, and unique pieces by Katheryn Trenshaw',
}; };
export const revalidate = 60; // Force dynamic rendering to ensure fresh data from Directus
export const dynamic = 'force-dynamic';
export const revalidate = 0;
async function getShopItems(): Promise<{ available: Artwork[]; sold: Artwork[] }> { async function getShopItems(): Promise<{ available: Artwork[]; sold: Artwork[] }> {
try { try {