Skip to content

Commit

Permalink
clarify time range in statistics
Browse files Browse the repository at this point in the history
  • Loading branch information
joergreichert committed Oct 30, 2024
1 parent fbf6dce commit fb73eb4
Showing 1 changed file with 19 additions and 7 deletions.
26 changes: 19 additions & 7 deletions src/components/Sidebar/SidebarStatistics/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { FC } from 'react';
import styled from 'styled-components';

import SidebarTitle from '../SidebarTitle/';
import Paragraph from '../../Paragraph';
import SmallParagraph from '../../SmallParagraph';
import { useStatisticsJson } from '../../../utils/hooks/useStatisticsJson';

Expand All @@ -10,18 +11,29 @@ const Wrapper = styled.div`
margin: 0 0 20px;
`;

const FlexCol = styled.div`
display: flex;
flex-direction: column;
`;

const SidebarStatistics: FC = () => {
const { data: statisticsJson } = useStatisticsJson();

return (
<Wrapper>
<>
<SidebarTitle>Gieß-Ranking 2024</SidebarTitle>
{(statisticsJson || []).map(user => (
<SmallParagraph>{((user.pos < 10) ? '00' : ((user.pos < 100) ? '0' : '')) + user.pos}. {user.username} ({user.liter} Liter)</SmallParagraph>
))}
<br /><br />
Mehr Statistiken gibt es <a target="_blank" href="https://joergreichert.github.io/gdk-opendata-plot/">hier</a> und <a target="_blank" href="https://dashboard.codeforleipzig.de/d/RQFRCgeGk/leipziggiesstpublic?orgId=3&from=1709247600000&to=now">hier</a>.
</Wrapper>
<FlexCol>
<Paragraph>
vom 01.04.2024 bis 30.09.2024
</Paragraph>
{(statisticsJson || []).map(user => (
<SmallParagraph>{((user.pos < 10) ? '00' : ((user.pos < 100) ? '0' : '')) + user.pos}. {user.username} ({user.liter} Liter)</SmallParagraph>
))}
<Paragraph>
Mehr Statistiken gibt es <a target="_blank" href="https://joergreichert.github.io/gdk-opendata-plot/">hier</a> und <a target="_blank" href="https://dashboard.codeforleipzig.de/d/RQFRCgeGk/leipziggiesstpublic?orgId=3&from=1709247600000&to=now">hier</a>.
</Paragraph>
</FlexCol>
</>
);
};

Expand Down

0 comments on commit fb73eb4

Please sign in to comment.