Skip to content

Commit d04f0e1

Browse files
committed
chore: change label in mobile if search is active
1 parent 535508a commit d04f0e1

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

web/src/pages/Home/TopJurors/Header/MobileHeader.tsx

+7-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ import React from "react";
22
import styled, { css } from "styled-components";
33

44
import { useToggle } from "react-use";
5+
import { useParams } from "react-router-dom";
56

67
import { landscapeStyle } from "styles/landscapeStyle";
78

9+
import { decodeURIFilter } from "utils/uri";
10+
811
import HowItWorks from "components/HowItWorks";
912
import JurorLevels from "components/Popup/MiniGuides/JurorLevels";
1013

@@ -34,9 +37,12 @@ const StyledLabel = styled.label`
3437

3538
export const MobileHeader: React.FC = () => {
3639
const [isJurorLevelsMiniGuideOpen, toggleJurorLevelsMiniGuide] = useToggle(false);
40+
const { filter } = useParams();
41+
const { id: searchValue } = decodeURIFilter(filter ?? "all");
42+
3743
return (
3844
<Container>
39-
<StyledLabel>Ranking</StyledLabel>
45+
<StyledLabel>{!searchValue ? "Ranking" : "Jurors"}</StyledLabel>
4046
<HowItWorks
4147
isMiniGuideOpen={isJurorLevelsMiniGuideOpen}
4248
toggleMiniGuide={toggleJurorLevelsMiniGuide}

0 commit comments

Comments
 (0)