Spaces:
Sleeping
Sleeping
Upload folder using huggingface_hub
Browse files
frontend/public/pla.png
ADDED
|
Git LFS Details
|
frontend/src/components/Navbar/Navbar.jsx
CHANGED
|
@@ -3,6 +3,7 @@ import { Moon, Sun, X, Info, Mail } from 'lucide-react';
|
|
| 3 |
import logo from '../../assets/pla.png';
|
| 4 |
// Adding our custom fonts specifically for the modals
|
| 5 |
const FONT_LINK = 'https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap';
|
|
|
|
| 6 |
|
| 7 |
export default function Navbar({ isDark, toggleTheme, hideNavLinks }) {
|
| 8 |
const [activeModal, setActiveModal] = useState(null);
|
|
@@ -35,6 +36,10 @@ export default function Navbar({ isDark, toggleTheme, hideNavLinks }) {
|
|
| 35 |
<div className="flex items-center gap-3 cursor-pointer z-10" onClick={handleHomeClick}>
|
| 36 |
<img
|
| 37 |
src={logo}
|
|
|
|
|
|
|
|
|
|
|
|
|
| 38 |
alt="PolicyLens"
|
| 39 |
className="h-8 w-auto object-contain rounded-lg"
|
| 40 |
/>
|
|
|
|
| 3 |
import logo from '../../assets/pla.png';
|
| 4 |
// Adding our custom fonts specifically for the modals
|
| 5 |
const FONT_LINK = 'https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600&family=Space+Grotesk:wght@500;600;700&display=swap';
|
| 6 |
+
const PUBLIC_LOGO_FALLBACK = `${import.meta.env.BASE_URL}pla.png`;
|
| 7 |
|
| 8 |
export default function Navbar({ isDark, toggleTheme, hideNavLinks }) {
|
| 9 |
const [activeModal, setActiveModal] = useState(null);
|
|
|
|
| 36 |
<div className="flex items-center gap-3 cursor-pointer z-10" onClick={handleHomeClick}>
|
| 37 |
<img
|
| 38 |
src={logo}
|
| 39 |
+
onError={(e) => {
|
| 40 |
+
if (e.currentTarget.src.endsWith('/pla.png')) return;
|
| 41 |
+
e.currentTarget.src = PUBLIC_LOGO_FALLBACK;
|
| 42 |
+
}}
|
| 43 |
alt="PolicyLens"
|
| 44 |
className="h-8 w-auto object-contain rounded-lg"
|
| 45 |
/>
|
frontend/vite.config.js
CHANGED
|
@@ -2,6 +2,11 @@ import { defineConfig } from 'vite'
|
|
| 2 |
import react from '@vitejs/plugin-react'
|
| 3 |
import tailwindcss from '@tailwindcss/vite'
|
| 4 |
|
| 5 |
-
export default defineConfig({
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
})
|
|
|
|
| 2 |
import react from '@vitejs/plugin-react'
|
| 3 |
import tailwindcss from '@tailwindcss/vite'
|
| 4 |
|
| 5 |
+
export default defineConfig(() => {
|
| 6 |
+
const base = process.env.VITE_BASE_PATH || '/'
|
| 7 |
+
|
| 8 |
+
return {
|
| 9 |
+
base,
|
| 10 |
+
plugins: [react(), tailwindcss()],
|
| 11 |
+
}
|
| 12 |
})
|