Remove notification system and fix data refresh issues

- Removed NotificationPanel component and related files
- Removed notifications API endpoint and utils
- Fixed data refresh functionality with cache-busting
- Added refreshing state with better UI feedback
- Added no-cache headers to API endpoint
- Improved refresh button with loading state
This commit is contained in:
Aram Chia Sarafian
2025-07-13 19:12:00 -07:00
parent ba831bf15a
commit 5206aceded
7 changed files with 128 additions and 502 deletions

View File

@ -1,5 +1,9 @@
import { NextResponse } from 'next/server';
// Force dynamic rendering to prevent caching
export const dynamic = 'force-dynamic';
export const revalidate = 0;
// Library branch locations with approximate coordinates
const LIBRARY_LOCATIONS: Record<string, { lat: number; lng: number }> = {
'Beckwourth': { lat: 32.7157, lng: -117.1611 },
@ -127,10 +131,17 @@ export async function GET() {
const locations = Array.from(locationMap.values());
return NextResponse.json({
const response = NextResponse.json({
locations,
lastUpdated: new Date().toISOString(),
});
// Prevent caching to ensure fresh data
response.headers.set('Cache-Control', 'no-cache, no-store, must-revalidate');
response.headers.set('Pragma', 'no-cache');
response.headers.set('Expires', '0');
return response;
} catch (error) {
console.error('Error in API route:', error);
return NextResponse.json(