-
Notifications
You must be signed in to change notification settings - Fork 92
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature created my campaigns tab (#1067)
* Saving files * Added MyCampaigns Tab feature * Fixed the whitespace and the translations * Fixed dublicate endpoints with different names * improved wording * hide my campaigns table if not in role Co-authored-by: quantum-grit <[email protected]>
- Loading branch information
Showing
13 changed files
with
655 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import { styled } from '@mui/material/styles' | ||
import { Box, Typography } from '@mui/material' | ||
import React from 'react' | ||
import { useTranslation } from 'next-i18next' | ||
|
||
import ProfileTab from './ProfileTab' | ||
import { ProfileTabs } from './tabs' | ||
import MyCampaingsTable from './MyCampaignsTable' | ||
import MyDonatedToCampaignTable from './MyDonatedToCampaignsTable' | ||
|
||
const PREFIX = 'MyCampaignsTab' | ||
|
||
const classes = { | ||
h3: `${PREFIX}-h3`, | ||
thinFont: `${PREFIX}-thinFont`, | ||
smallText: `${PREFIX}-smallText`, | ||
boxTitle: `${PREFIX}-boxTitle`, | ||
} | ||
|
||
const Root = styled('div')(({ theme }) => ({ | ||
[`& .${classes.h3}`]: { | ||
fontStyle: 'normal', | ||
fontWeight: '500', | ||
fontSize: '25px', | ||
lineHeight: '116.7%', | ||
margin: '0', | ||
}, | ||
[`& .${classes.thinFont}`]: { | ||
fontStyle: 'normal', | ||
fontWeight: 400, | ||
fontSize: '24px', | ||
lineHeight: '123.5%', | ||
letterSpacing: '0.25px', | ||
color: '#000000', | ||
margin: 0, | ||
}, | ||
[`& .${classes.smallText}`]: { | ||
fontFamily: 'Lato, sans-serif', | ||
fontStyle: 'normal', | ||
fontWeight: '500', | ||
fontSize: '15px', | ||
lineHeight: '160%', | ||
letterSpacing: '0.15px', | ||
}, | ||
[`& .${classes.boxTitle}`]: { | ||
backgroundColor: 'white', | ||
padding: theme.spacing(3, 7), | ||
paddingBottom: theme.spacing(3), | ||
marginTop: theme.spacing(3), | ||
boxShadow: theme.shadows[3], | ||
}, | ||
})) | ||
|
||
export default function MyCampaignsTab() { | ||
const { t } = useTranslation() | ||
return ( | ||
<Root> | ||
<MyCampaingsTable /> | ||
<Box className={classes.boxTitle}> | ||
<Typography className={classes.h3}>{t('profile:myCampaigns.donatedTo')}</Typography> | ||
</Box> | ||
<ProfileTab name={ProfileTabs.myCampaigns}> | ||
<MyDonatedToCampaignTable /> | ||
</ProfileTab> | ||
</Root> | ||
) | ||
} |
Oops, something went wrong.