Skip to content

Commit

Permalink
feat: Added Reports History component to Reports Page (#272)
Browse files Browse the repository at this point in the history
Added reports history component to reports page.
  • Loading branch information
chadstewart committed Aug 26, 2022
1 parent e42e014 commit c6a56f6
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/molecules/ReportsHistory/reports-history.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const ReportsHistory = ({ reportList }: ReportsHistoryProps): JSX.Element => {
const heading = <Title level={5} className="!text-light-slate-9 uppercase">
<div className="flex justify-between w-full gap-2">
<div className="w-2/5 text-xs font-semibold text-slate-400 tracking-wide uppercase">
report date
report name
</div>
<div className="w-1/5 text-xs font-semibold text-slate-400 tracking-wide uppercase">
issue date
Expand Down
26 changes: 23 additions & 3 deletions components/organisms/Reports/reports.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
import Title from "components/atoms/Typography/title";
import ReportsHistory from "components/molecules/ReportsHistory/reports-history";
import SelectReportsFilter from "components/molecules/SelectReportsFilter/select-reports-filter";
import { Report } from "interfaces/report-type";

const Reports = (): JSX.Element => {

const reportList: Report[] = [
{
reportName: "Top Ten",
reportDate: "Jun 3, 2022",
reportFormat: "CSV",
isGenerated: true
},
{
reportName: "Top Five",
reportDate: "Jun 3, 2022",
reportFormat: "CSV",
isGenerated: false
}
];

return (
<section className="w-full py-4 px-8 flex justify-center">
<div className="max-w-4xl">
<Title className="!font-medium relative !text-left " level={3}>
<Title className="!font-medium relative" level={3}>
Contributions Insights
</Title>
<hr className="border-light-slate-6 my-4" />
Expand All @@ -16,11 +34,13 @@ const Reports = (): JSX.Element => {
}}
/>
</div>
<Title className="!font-medium relative mt-16 !text-left " level={3}>
<Title className="!font-medium relative mt-16" level={3}>
Download History
</Title>
<hr className="border-light-slate-6 my-4" />
{/* Download History goes here */}
<div>
<ReportsHistory reportList={reportList}/>
</div>
</div>
</section>
);
Expand Down
2 changes: 1 addition & 1 deletion layouts/filter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const FilterLayout = ({children}: {children: React.ReactNode}) => {
/>
</div>

<main className="flex w-full flex-1 flex-col items-center text-center px-3 md:px-16 py-8">
<main className="flex w-full flex-1 flex-col items-center px-3 md:px-16 py-8">
{children}
</main>
</div>
Expand Down

0 comments on commit c6a56f6

Please sign in to comment.