Skip to content

Commit 24ffe3d

Browse files
authored
Merge pull request #87 from algorithm-ssau/feature/frontend
Возврат на главную из профиля
2 parents 9f248cf + 435d0b6 commit 24ffe3d

File tree

1 file changed

+15
-2
lines changed
  • organizer-frontend/src/components/Header

1 file changed

+15
-2
lines changed

organizer-frontend/src/components/Header/Header.jsx

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
import React from "react";
2+
import { useNavigate } from "react-router-dom";
23

34
function Header() {
5+
const navigate = useNavigate(); const handleLogoClick = () => {
6+
window.location.href = '/';
7+
};
8+
49
return (
510
<header>
6-
<img className="logoimg" src="./logo.png" />
7-
<div style={{ textShadow: '0 2px 4px rgba(0, 0, 0, 0.5)', display: 'inline-block', whiteSpace:'pre' }}>
11+
<img className="logoimg" src="./logo.png" onClick={handleLogoClick} style={{ cursor: 'pointer' }} />
12+
<div
13+
onClick={handleLogoClick}
14+
style={{
15+
textShadow: '0 2px 4px rgba(0, 0, 0, 0.5)',
16+
display: 'inline-block',
17+
whiteSpace:'pre',
18+
cursor: 'pointer'
19+
}}
20+
>
821
Оборот событий
922
</div>
1023
<div className="profile-icon">

0 commit comments

Comments
 (0)