ymk00 commited on
Commit
21874de
·
1 Parent(s): f3ba093

Update logo

Browse files
frontend/public/YaleUniLogo.svg ADDED
frontend/src/components/Logo/Logo.js CHANGED
@@ -5,76 +5,55 @@ import HFLogo from "./HFLogo";
5
  import { useLeaderboard } from "../../pages/LeaderboardPage/components/Leaderboard/context/LeaderboardContext";
6
 
7
  const Logo = ({ height = "40px" }) => {
8
- const navigate = useNavigate();
9
- const [searchParams, setSearchParams] = useSearchParams();
10
- const location = useLocation();
11
- const { actions } = useLeaderboard();
12
 
13
- const handleReset = () => {
14
- // Reset all leaderboard state first
15
- actions.resetAll();
16
 
17
- // Then clean URL in one go
18
- if (
19
- location.pathname !== "/" ||
20
- searchParams.toString() !== "" ||
21
- location.hash !== ""
22
- ) {
23
- window.history.replaceState(null, "", "/");
24
- navigate("/", { replace: true, state: { skipUrlSync: true } });
25
- setSearchParams({}, { replace: true, state: { skipUrlSync: true } });
26
- }
27
- };
 
 
 
28
 
29
- return (
30
- <Box
31
- onClick={handleReset}
32
- sx={{
33
- height,
34
- display: "flex",
35
- alignItems: "center",
36
- justifyContent: "center",
37
- cursor: "pointer",
38
- transition: "opacity 0.2s ease",
39
- "&:hover": {
40
- opacity: 0.8,
41
- },
42
- }}
43
- >
44
  <Box
45
- component="img"
46
- src="/logofinai.png"
47
- sx={{
48
- height: 80,
49
- mx: 2,
50
- }}
51
- />
52
- <Box
53
- component="img"
54
- src="/nactemlogo.png"
55
- sx={{
56
- height: 60,
57
- mx: 2,
58
- }}
59
- />
60
- <Box
61
- component="img"
62
- src="/archimedeslogo.png"
63
- sx={{
64
- height: 60,
65
- mx: 2,
66
- }}
67
- />
68
- <Box
69
- component="img"
70
- src="/airclogo.png"
71
- sx={{
72
- height: 80,
73
- mx: 2,
74
- }}
75
- />
76
- </Box>
77
- );
78
  };
79
 
80
  export default Logo;
 
5
  import { useLeaderboard } from "../../pages/LeaderboardPage/components/Leaderboard/context/LeaderboardContext";
6
 
7
  const Logo = ({ height = "40px" }) => {
8
+ const navigate = useNavigate();
9
+ const [searchParams, setSearchParams] = useSearchParams();
10
+ const location = useLocation();
11
+ const { actions } = useLeaderboard();
12
 
13
+ const handleReset = () => {
14
+ // Reset all leaderboard state first
15
+ actions.resetAll();
16
 
17
+ // Then clean URL in one go
18
+ if (
19
+ location.pathname !== "/" ||
20
+ searchParams.toString() !== "" ||
21
+ location.hash !== ""
22
+ ) {
23
+ window.history.replaceState(null, "", "/");
24
+ navigate("/", { replace: true, state: { skipUrlSync: true } });
25
+ setSearchParams(
26
+ {},
27
+ { replace: true, state: { skipUrlSync: true } }
28
+ );
29
+ }
30
+ };
31
 
32
+ return (
 
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  <Box
34
+ onClick={handleReset}
35
+ sx={{
36
+ height,
37
+ display: "flex",
38
+ alignItems: "center",
39
+ justifyContent: "center",
40
+ cursor: "pointer",
41
+ transition: "opacity 0.2s ease",
42
+ "&:hover": {
43
+ opacity: 0.8,
44
+ },
45
+ }}
46
+ >
47
+ <Box
48
+ component="img"
49
+ src="/YaleUniLogo.svg"
50
+ sx={{
51
+ height: 60,
52
+ mx: 2,
53
+ }}
54
+ />
55
+ </Box>
56
+ );
 
 
 
 
 
 
 
 
 
 
57
  };
58
 
59
  export default Logo;