Skip to content

Commit

Permalink
now when clicking a product anywhere it gets linked
Browse files Browse the repository at this point in the history
  • Loading branch information
Bicheka committed Aug 1, 2024
1 parent 6817d0b commit 05bc3d2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import NavBar from "./NavBar";
import "../css/App.css"
import { Provider} from "react-redux";
import store from "./redux/store";
import "../css/global.scss"



function App(){
Expand Down
6 changes: 4 additions & 2 deletions src/components/Product.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,18 +99,19 @@ function Product(props) {

return (
<div className="product">
<Link to={`/admin-product-details/${props.id}`}>
{
currentLocation === "admin-store" && role === "STORE" ?
(
<Link to={`/admin-product-details/${props.id}`}>

<div className="productImg">
<img
className="product-img"
src={productImage ? `data:image/jpeg;base64,${productImage}` : defaultImage}
alt="product"
/>
</div>
</Link>

)
:
(
Expand Down Expand Up @@ -142,6 +143,7 @@ function Product(props) {
)
}
</div>
</Link>
</div>

);
Expand Down

0 comments on commit 05bc3d2

Please sign in to comment.