|
| 1 | +import React from "react"; |
| 2 | +import { landscapeStyle } from "styles/landscapeStyle"; |
| 3 | +import styled, { css } from "styled-components"; |
| 4 | +import Rank from "./Rank"; |
| 5 | +import JurorTitle from "./JurorTitle"; |
| 6 | +import Rewards from "./Rewards"; |
| 7 | +import Coherency from "./Coherency"; |
| 8 | +import HowItWorks from "./HowItWorks"; |
| 9 | + |
| 10 | +const Container = styled.div` |
| 11 | + display: none; |
| 12 | +
|
| 13 | + justify-content: space-between; |
| 14 | + flex-wrap: wrap; |
| 15 | + width: 100%; |
| 16 | + background-color: ${({ theme }) => theme.whiteBackground}; |
| 17 | + border: 1px solid ${({ theme }) => theme.stroke}; |
| 18 | + border-top: none; |
| 19 | + align-items: center; |
| 20 | + padding: 15.55px 32px; |
| 21 | +
|
| 22 | + label { |
| 23 | + font-size: 16px; |
| 24 | + } |
| 25 | +
|
| 26 | + ${landscapeStyle( |
| 27 | + () => css` |
| 28 | + display: flex; |
| 29 | + ` |
| 30 | + )} |
| 31 | +`; |
| 32 | + |
| 33 | +const PlaceAndTitleAndRewardsAndCoherency = styled.div` |
| 34 | + display: flex; |
| 35 | + flex-direction: row; |
| 36 | + gap: calc(20px + (28 - 20) * (min(max(100vw, 375px), 1250px) - 375px) / 875); |
| 37 | +`; |
| 38 | + |
| 39 | +interface IDesktopCard { |
| 40 | + rank: number; |
| 41 | + address: string; |
| 42 | + totalCoherent: number; |
| 43 | + totalResolvedDisputes: number; |
| 44 | + coherenceScore: number; |
| 45 | +} |
| 46 | + |
| 47 | +const DesktopCard: React.FC<IDesktopCard> = ({ |
| 48 | + rank, |
| 49 | + address, |
| 50 | + totalCoherent, |
| 51 | + totalResolvedDisputes, |
| 52 | + coherenceScore, |
| 53 | +}) => { |
| 54 | + return ( |
| 55 | + <Container> |
| 56 | + <PlaceAndTitleAndRewardsAndCoherency> |
| 57 | + <Rank rank={rank} /> |
| 58 | + <JurorTitle address={address} /> |
| 59 | + <Rewards address={address} /> |
| 60 | + <Coherency totalCoherent={totalCoherent} totalResolvedDisputes={totalResolvedDisputes} /> |
| 61 | + </PlaceAndTitleAndRewardsAndCoherency> |
| 62 | + <HowItWorks coherenceScore={coherenceScore} /> |
| 63 | + </Container> |
| 64 | + ); |
| 65 | +}; |
| 66 | +export default DesktopCard; |
0 commit comments