Skip to content

Commit

Permalink
feat: add submitted date
Browse files Browse the repository at this point in the history
  • Loading branch information
andywong418 committed Mar 5, 2024
1 parent 121ad29 commit 46b728c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import useAlerts from "utils/hooks";
import { StyledCheckbox } from "components/PaymentLedger/styles";
import { CommonTypography, TextWrapper } from "components/MembersAnalytics/styles";
import { PointsIcon } from "components/Icons/Rewards";

import { format } from "date-fns";
/*
steps -> steps details from the quest ( type, order, prompt )
Expand Down Expand Up @@ -159,9 +159,15 @@ const QuestResultsCard = ({ submission }) => {
return (
<AccordionComponent
renderTitle={() => (
<Typography fontFamily="Poppins" fontWeight={600} fontSize="13px" lineHeight="20px" color="black">
{submission.user}
</Typography>
<Box display="flex" gap="12px" alignItems="center" width="100%" paddingRight="16px">
<Typography fontFamily="Poppins" fontWeight={600} fontSize="13px" lineHeight="20px" color="black">
{submission.user}
</Typography>
<Box flex={1} />
<Typography fontFamily="Poppins" fontWeight={500} fontSize="13px" lineHeight="20px" color="black">
Submitted {format(new Date(submission.createdAt), "MM/dd/yyyy")}
</Typography>
</Box>
)}
>
<Grid bgcolor="white" gap="18px" padding="14px" display="flex" flexDirection="column">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ const ViewQuestResults = ({ quest, rewards }) => {
id: submission?.id,
approvedAt: submission?.approvedAt,
rejectedAt: submission?.rejectedAt,
createdAt: submission?.createdAt,
}));
}, [submissionsData?.getQuestSubmissions, loading, quest]);

Expand Down Expand Up @@ -264,7 +265,6 @@ const ViewQuestResults = ({ quest, rewards }) => {
showBorder: false,
},
];

return (
<PageWrapper
containerProps={{
Expand Down

0 comments on commit 46b728c

Please sign in to comment.