Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Responsive Design to Impact Summary in Home and Past Events Page #194

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 18 additions & 14 deletions src/components/Events/ImpactSummary.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const ImpactSummary = () => {
getData();
}, []);


const getData = async () => {
try {
let response = await Backend.get('/stats/registered');
Expand Down Expand Up @@ -56,24 +57,24 @@ const ImpactSummary = () => {

const flexDirectionBreakpoint = useBreakpointValue(
{
base: 'column',
sm: 'column',
md: 'row',
base: "column",
sm: "column",
md: "row"
},
{
fallback: 'row',
},
fallback: "row"
}
);

const gapBreakpoint = useBreakpointValue(
{
base: 0,
sm: 0,
md: 120,
},
{
fallback: 120,
},
const gapBreakpoint = useBreakpointValue(
{
base: 0,
sm: 0,
md: 120
},
{
fallback: 120
}
);

useEffect(() => {
Expand All @@ -89,6 +90,7 @@ const ImpactSummary = () => {
getEventId();
}, []);


return (
<Box
mb="5"
Expand All @@ -101,6 +103,7 @@ const ImpactSummary = () => {
borderRadius={'lg'}
py={10}
>

<DataCard
amount={registered}
text={'Total Registered Volunteers'}
Expand Down Expand Up @@ -147,6 +150,7 @@ const ImpactSummary = () => {
{/* Export Data */}
</Button>
</VStack>

</Box>
);
};
Expand Down
Loading