start on migrating from Supabase to local Postgress, and passport.js for auth because CORS

This commit is contained in:
2025-11-19 15:30:59 -08:00
parent e8b651929e
commit b330ce4cd1
20 changed files with 1144 additions and 539 deletions

View File

@@ -1,5 +1,6 @@
import React, { useState, useCallback, useEffect } from 'react';
import { Routes, Route } from 'react-router-dom';
import { Toaster } from 'react-hot-toast';
import { FlyerDisplay } from './components/FlyerDisplay';
import { ExtractedDataTable } from './components/ExtractedDataTable';
import { AnalysisPanel } from './components/AnalysisPanel';
@@ -28,7 +29,7 @@ import { AdminPage } from './pages/AdminPage';
import { AdminRoute } from './components/AdminRoute';
import { CorrectionsPage } from './pages/CorrectionsPage';
import { WatchedItemsList } from './components/WatchedItemsList';
import { AdminStatsPage } from './pages/AdminStatsPage';
import { AdminStatsPage } from './pages/AdminStatPages';
import { ResetPasswordPage } from './pages/ResetPasswordPage';
// Define a more descriptive type for the authentication status.
@@ -691,6 +692,17 @@ function App() {
return (
<div className="bg-gray-100 dark:bg-gray-950 min-h-screen font-sans text-gray-800 dark:text-gray-200">
{/* Toaster component for displaying notifications. It's placed at the top level. */}
<Toaster position="top-center" reverseOrder={false} />
{/* Add CSS variables for toast theming based on dark mode */}
<style>{`
:root {
--toast-bg: ${isDarkMode ? '#4B5563' : '#FFFFFF'};
--toast-color: ${isDarkMode ? '#F9FAFB' : '#1F2937'};
}
`}</style>
<Header
isDarkMode={isDarkMode} // Still pass for display, but toggling happens in ProfileManager
// toggleDarkMode removed