Skip to content

Commit 873399d

Browse files
committed
feat(web): add how it works miniguide to dashboard, style header for mobile
1 parent 1e917ed commit 873399d

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

web/src/pages/Dashboard/JurorInfo/Header.tsx

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,39 @@
11
import React from "react";
2-
import styled from "styled-components";
2+
import styled, { css } from "styled-components";
33
import XIcon from "svgs/socialmedia/x.svg";
4+
import HowItWorks from "pages/Home/TopJurors/Header/HowItWorks";
5+
import { landscapeStyle } from "styles/landscapeStyle";
46

57
const Container = styled.div`
68
display: flex;
7-
flex-direction: row;
9+
flex-direction: column;
810
align-items: center;
911
justify-content: space-between;
12+
13+
${landscapeStyle(
14+
() => css`
15+
flex-direction: row;
16+
`
17+
)}
1018
`;
1119

1220
const StyledTitle = styled.h1`
1321
margin-bottom: calc(16px + (48 - 16) * (min(max(100vw, 375px), 1250px) - 375px) / 875);
1422
`;
1523

16-
const XLinkContainer = styled.div`
24+
const LinksContainer = styled.div`
1725
display: flex;
1826
color: ${({ theme }) => theme.primaryBlue};
1927
margin-bottom: calc(16px + (48 - 16) * (min(max(100vw, 375px), 1250px) - 375px) / 875);
28+
align-items: center;
29+
gap: 24px;
30+
flex-wrap: wrap;
31+
32+
${landscapeStyle(
33+
() => css`
34+
gap: 32px;
35+
`
36+
)}
2037
`;
2138

2239
const StyledXIcon = styled(XIcon)`
@@ -52,11 +69,12 @@ const Header: React.FC<IHeader> = ({ levelTitle, levelNumber, totalCoherent, tot
5269
return (
5370
<Container>
5471
<StyledTitle>Juror Dashboard</StyledTitle>
55-
<XLinkContainer>
72+
<LinksContainer>
73+
<HowItWorks />
5674
<StyledLink href={xShareUrl} target="_blank" rel="noreferrer">
5775
<StyledXIcon /> <span>Share your juror score</span>
5876
</StyledLink>
59-
</XLinkContainer>
77+
</LinksContainer>
6078
</Container>
6179
);
6280
};

0 commit comments

Comments
 (0)