Skip to content

Commit

Permalink
LEVELSTEIN
Browse files Browse the repository at this point in the history
  • Loading branch information
cmaloney111 committed Jun 7, 2024
1 parent 2366bc6 commit d4749f1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions packages/react-frontend/src/Components/Navbar.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from "react";
import React, { useState, useEffect } from "react";
import { BrowserRouter as Router, Routes, Route, Link } from "react-router-dom";
import Inventory from "../Views/Inventory";
import LoginPage from "../Views/LoginPage";
Expand Down Expand Up @@ -42,13 +42,22 @@ function App() {
}

function NavBar() {
const [src, setSrc] = useState('yes.png');

useEffect(() => {
const img = new Image();
img.onload = () => setSrc('../yes.png');
img.onerror = () => setSrc('yes.png');
img.src = '../yes.png';
}, []);

return (
<div className="container">
<nav className="navbar">
<ul className="nav-list">
<li>
<a href="/">
<img className="logo" src="yes.png"/>
<img className="logo" src={src} alt="Logo"/>
</a>
</li>
<li className="hover">
Expand Down
2 changes: 1 addition & 1 deletion packages/react-frontend/src/Views/ProductPage.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ function ProductPage() {
return (
<div>
<li>
<img className="ProductPageLogo" src="yes.png" alt="Loading" />
<img className="ProductPageLogo" src="..yes.png" alt="Loading" />
</li>
<div className="subtitle-container">
<h2 className="subtitle">Your Product: {product.product}</h2>
Expand Down

0 comments on commit d4749f1

Please sign in to comment.