Spaces:
Running
Running
Update frontend/src/Layout.jsx
Browse files- frontend/src/Layout.jsx +10 -1
frontend/src/Layout.jsx
CHANGED
|
@@ -11,6 +11,11 @@ import {
|
|
| 11 |
} from "lucide-react";
|
| 12 |
import { cn } from "@/lib/utils";
|
| 13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
export default function Layout({ children, currentPageName }) {
|
| 15 |
const [collapsed, setCollapsed] = useState(false);
|
| 16 |
|
|
@@ -38,9 +43,13 @@ export default function Layout({ children, currentPageName }) {
|
|
| 38 |
<Link to={createPageUrl("Dashboard")} className="flex items-center gap-3">
|
| 39 |
<div className="h-9 w-9 flex items-center justify-center flex-shrink-0">
|
| 40 |
<img
|
| 41 |
-
src=
|
| 42 |
alt="EZOFIS AI Logo"
|
| 43 |
className="h-full w-full object-contain"
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
/>
|
| 45 |
</div>
|
| 46 |
{!collapsed && (
|
|
|
|
| 11 |
} from "lucide-react";
|
| 12 |
import { cn } from "@/lib/utils";
|
| 13 |
|
| 14 |
+
// Import logo - Vite will process this and handle the path correctly
|
| 15 |
+
// For production, the logo should be in frontend/public/logo.png
|
| 16 |
+
// Vite will copy it to dist/logo.png during build
|
| 17 |
+
const logoPath = "/logo.png";
|
| 18 |
+
|
| 19 |
export default function Layout({ children, currentPageName }) {
|
| 20 |
const [collapsed, setCollapsed] = useState(false);
|
| 21 |
|
|
|
|
| 43 |
<Link to={createPageUrl("Dashboard")} className="flex items-center gap-3">
|
| 44 |
<div className="h-9 w-9 flex items-center justify-center flex-shrink-0">
|
| 45 |
<img
|
| 46 |
+
src={logoPath}
|
| 47 |
alt="EZOFIS AI Logo"
|
| 48 |
className="h-full w-full object-contain"
|
| 49 |
+
onError={(e) => {
|
| 50 |
+
// Fallback: hide image and show placeholder if logo not found
|
| 51 |
+
e.target.style.display = 'none';
|
| 52 |
+
}}
|
| 53 |
/>
|
| 54 |
</div>
|
| 55 |
{!collapsed && (
|