feat: initialize Prisma schema and scaffold core application modules including auth, blogs, events, and business directories
Some checks failed
Build and Push App / build (push) Failing after 47s

This commit is contained in:
2026-04-22 22:59:12 +02:00
parent b01b2f6476
commit 2e7cb65a29
32 changed files with 1392 additions and 310 deletions

View File

@@ -34,13 +34,12 @@ const AnnuairePageContent = () => {
useEffect(() => {
const fetchHeadliner = async () => {
try {
const res = await fetch('/api/businesses?featured=true');
// Disable caching to ensure we get fresh data and more variety
const res = await fetch('/api/businesses?featured=true', { cache: 'no-store' });
const data = await res.json();
if (Array.isArray(data) && data.length > 0) {
// Stable random based on the current date (YYYYMMDD)
const today = new Date().toISOString().slice(0, 10).replace(/-/g, '');
const seed = parseInt(today);
const randomIndex = seed % data.length;
// Truly random selection from the pool of featured businesses
const randomIndex = Math.floor(Math.random() * data.length);
setFeaturedBusiness(data[randomIndex]);
}
} catch (error) {