main
Last change
on this file was 0c6b92a, checked in by stefan toskovski <stefantoska84@…>, 5 weeks ago |
Pred finalna verzija
|
-
Property mode
set to
100644
|
File size:
558 bytes
|
Line | |
---|
1 | import React from "react";
|
---|
2 | import { useNavigate } from "react-router-dom";
|
---|
3 | import logoImage from "../../assets/logo_icon.png";
|
---|
4 | import styles from "./Logo.module.css";
|
---|
5 |
|
---|
6 | function Logo({ position = "fixed" }) {
|
---|
7 | const navigate = useNavigate();
|
---|
8 |
|
---|
9 | const handleClick = () => {
|
---|
10 | navigate("/");
|
---|
11 | };
|
---|
12 |
|
---|
13 | return (
|
---|
14 | <div
|
---|
15 | className={position === "fixed" ? styles.fixedLogoContainer : styles.inlineLogoContainer}
|
---|
16 | onClick={handleClick}
|
---|
17 | >
|
---|
18 | <img src={logoImage} alt="Logo" className={styles.logoImage} />
|
---|
19 | </div>
|
---|
20 | );
|
---|
21 | }
|
---|
22 |
|
---|
23 | export default Logo;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.