From ea2f2d345b691b26e841b8e8ff22089d3d43742a Mon Sep 17 00:00:00 2001 From: ani-kalpachka Date: Sun, 17 Mar 2024 10:56:18 +0200 Subject: [PATCH 1/7] Upate font sizes - initail commit --- src/components/admin/affiliates/AffiliatesPage.tsx | 2 +- src/components/admin/countries/grid/CountryGrid.tsx | 2 +- src/components/admin/expenses/grid/Grid.tsx | 4 ++-- .../client/auth/profile/AffiliateProgramTab.tsx | 6 +++--- src/components/client/auth/profile/CertificatesTab.tsx | 6 +++--- .../client/auth/profile/DonationAgreementTab.tsx | 2 +- src/components/client/auth/profile/DonationTab.tsx | 6 +++--- src/components/client/auth/profile/MyCampaignsTab.tsx | 6 +++--- src/components/client/auth/profile/MyNotificationsTab.tsx | 7 +++---- src/components/client/auth/profile/PersonalInfoTab.tsx | 8 ++++---- src/components/client/auth/profile/ProfilePage.tsx | 2 +- src/components/client/auth/register/RegisterPage.tsx | 4 +++- .../campaign-expenses/grid/CampaignExpensesGrid.tsx | 6 ++++-- 13 files changed, 32 insertions(+), 29 deletions(-) diff --git a/src/components/admin/affiliates/AffiliatesPage.tsx b/src/components/admin/affiliates/AffiliatesPage.tsx index 8879b9e8f..07cbd83d7 100644 --- a/src/components/admin/affiliates/AffiliatesPage.tsx +++ b/src/components/admin/affiliates/AffiliatesPage.tsx @@ -20,7 +20,7 @@ import LoopIcon from '@mui/icons-material/Loop' const addIconStyles = { color: '#4ac3ff', background: 'transperent', - fontSize: '40px', + fontSize: theme.typography.pxToRem(40), cursor: 'pointer', padding: 0.7, } diff --git a/src/components/admin/countries/grid/CountryGrid.tsx b/src/components/admin/countries/grid/CountryGrid.tsx index cb28087cd..28f7f9311 100644 --- a/src/components/admin/countries/grid/CountryGrid.tsx +++ b/src/components/admin/countries/grid/CountryGrid.tsx @@ -23,7 +23,7 @@ const classes = { const Root = styled('div')({ [`& .${classes.gridColumn}`]: { '& .MuiDataGrid-columnHeaderTitle': { - fontSize: '14px', + fontSize: theme.typography.pxToRem(14), fontWeight: '700', }, }, diff --git a/src/components/admin/expenses/grid/Grid.tsx b/src/components/admin/expenses/grid/Grid.tsx index 5c528bd37..484bf8528 100644 --- a/src/components/admin/expenses/grid/Grid.tsx +++ b/src/components/admin/expenses/grid/Grid.tsx @@ -33,11 +33,11 @@ const Root = styled('div')({ marginTop: '30px', marginRight: '40px', }, - fontSize: '12px', + fontSize: theme.typography.pxToRem(12), }, [`& .${classes.gridColumn}`]: { '& .MuiDataGrid-columnHeaderTitle': { - fontSize: '14px', + fontSize: theme.typography.pxToRem(14), fontWeight: '700', }, }, diff --git a/src/components/client/auth/profile/AffiliateProgramTab.tsx b/src/components/client/auth/profile/AffiliateProgramTab.tsx index 5d8a387be..cd17e400a 100644 --- a/src/components/client/auth/profile/AffiliateProgramTab.tsx +++ b/src/components/client/auth/profile/AffiliateProgramTab.tsx @@ -41,21 +41,21 @@ const Root = styled(Box)(({ theme }) => ({ [`& .${classes.h1}`]: { fontStyle: 'normal', fontWeight: '500', - fontSize: '30px', + fontSize: theme.typography.pxToRem(30), lineHeight: '65px', paddingLeft: 2, }, [`& .${classes.h3}`]: { fontStyle: 'normal', fontWeight: '500', - fontSize: '25px', + fontSize: theme.typography.pxToRem(25), lineHeight: '116.7%', margin: '0', }, [`& .${classes.h2}`]: { fontStyle: 'normal', fontWeight: '500', - fontSize: '23px', + fontSize: theme.typography.pxToRem(23), lineHeight: '116.7%', marginBottom: theme.spacing(3), }, diff --git a/src/components/client/auth/profile/CertificatesTab.tsx b/src/components/client/auth/profile/CertificatesTab.tsx index 195aefb3f..902342001 100644 --- a/src/components/client/auth/profile/CertificatesTab.tsx +++ b/src/components/client/auth/profile/CertificatesTab.tsx @@ -19,14 +19,14 @@ const Root = styled('div')(({ theme }) => ({ [`& .${classes.h3}`]: { fontStyle: 'normal', fontWeight: '500', - fontSize: '25px', + fontSize: theme.typography.pxToRem(25), lineHeight: '116.7%', margin: '0', }, [`& .${classes.thinFont}`]: { fontStyle: 'normal', fontWeight: 400, - fontSize: '24px', + fontSize: theme.typography.pxToRem(24), lineHeight: '123.5%', letterSpacing: '0.25px', color: theme.palette.common.black, @@ -35,7 +35,7 @@ const Root = styled('div')(({ theme }) => ({ [`& .${classes.smallText}`]: { fontStyle: 'normal', fontWeight: '500', - fontSize: '15px', + fontSize: theme.typography.pxToRem(15), lineHeight: '160%', letterSpacing: '0.15px', }, diff --git a/src/components/client/auth/profile/DonationAgreementTab.tsx b/src/components/client/auth/profile/DonationAgreementTab.tsx index 5c0db5cc9..acb61ad4d 100644 --- a/src/components/client/auth/profile/DonationAgreementTab.tsx +++ b/src/components/client/auth/profile/DonationAgreementTab.tsx @@ -14,7 +14,7 @@ const Root = styled('div')(({ theme }) => ({ [`& .${classes.h3}`]: { fontStyle: 'normal', fontWeight: '500', - fontSize: '25px', + fontSize: theme.typography.pxToRem(25), lineHeight: '116.7%', margin: '0', }, diff --git a/src/components/client/auth/profile/DonationTab.tsx b/src/components/client/auth/profile/DonationTab.tsx index 33d64229f..95749fbec 100644 --- a/src/components/client/auth/profile/DonationTab.tsx +++ b/src/components/client/auth/profile/DonationTab.tsx @@ -52,21 +52,21 @@ const Root = styled('div')(({ theme }) => ({ [`& .${classes.h1}`]: { fontStyle: 'normal', fontWeight: '500', - fontSize: '30px', + fontSize: theme.typography.pxToRem(30), lineHeight: '65px', paddingLeft: 2, }, [`& .${classes.h3}`]: { fontStyle: 'normal', fontWeight: '500', - fontSize: '25px', + fontSize: theme.typography.pxToRem(25), lineHeight: '116.7%', margin: '0', }, [`& .${classes.h2}`]: { fontStyle: 'normal', fontWeight: '500', - fontSize: '23px', + fontSize: theme.typography.pxToRem(23), lineHeight: '116.7%', marginBottom: theme.spacing(3), }, diff --git a/src/components/client/auth/profile/MyCampaignsTab.tsx b/src/components/client/auth/profile/MyCampaignsTab.tsx index 1de56ca9e..48b9a4fbf 100644 --- a/src/components/client/auth/profile/MyCampaignsTab.tsx +++ b/src/components/client/auth/profile/MyCampaignsTab.tsx @@ -21,14 +21,14 @@ const Root = styled('div')(({ theme }) => ({ [`& .${classes.h3}`]: { fontStyle: 'normal', fontWeight: '500', - fontSize: '25px', + fontSize: theme.typography.pxToRem(25), lineHeight: '116.7%', margin: '0', }, [`& .${classes.thinFont}`]: { fontStyle: 'normal', fontWeight: 400, - fontSize: '24px', + fontSize: theme.typography.pxToRem(24), lineHeight: '123.5%', letterSpacing: '0.25px', color: theme.palette.common.black, @@ -37,7 +37,7 @@ const Root = styled('div')(({ theme }) => ({ [`& .${classes.smallText}`]: { fontStyle: 'normal', fontWeight: '500', - fontSize: '15px', + fontSize: theme.typography.pxToRem(15), lineHeight: '160%', letterSpacing: '0.15px', }, diff --git a/src/components/client/auth/profile/MyNotificationsTab.tsx b/src/components/client/auth/profile/MyNotificationsTab.tsx index ff289d7bf..846fbf71f 100644 --- a/src/components/client/auth/profile/MyNotificationsTab.tsx +++ b/src/components/client/auth/profile/MyNotificationsTab.tsx @@ -27,23 +27,22 @@ const Root = styled('div')(({ theme }) => ({ [`& .${classes.h3}`]: { fontStyle: 'normal', fontWeight: '500', - fontSize: '25px', + fontSize: theme.typography.pxToRem(25), lineHeight: '116.7%', margin: '0', }, [`& .${classes.thinFont}`]: { fontStyle: 'normal', fontWeight: 400, - fontSize: '24px', + fontSize: theme.typography.pxToRem(24), lineHeight: '123.5%', letterSpacing: '0.25px', - // color: theme.palette.common.black, margin: 0, }, [`& .${classes.smallText}`]: { fontStyle: 'normal', fontWeight: '500', - fontSize: '15px', + fontSize: theme.typography.pxToRem(15), lineHeight: '160%', letterSpacing: '0.15px', }, diff --git a/src/components/client/auth/profile/PersonalInfoTab.tsx b/src/components/client/auth/profile/PersonalInfoTab.tsx index 5b3e7c11f..e2c553d97 100644 --- a/src/components/client/auth/profile/PersonalInfoTab.tsx +++ b/src/components/client/auth/profile/PersonalInfoTab.tsx @@ -44,7 +44,7 @@ const Root = styled('div')(({ theme }) => ({ [`& .${classes.heading}`]: { fontStyle: 'normal', fontWeight: 400, - fontSize: '24px', + fontSize: theme.typography.pxToRem(24), lineHeight: '123.5%', letterSpacing: '0.25px', color: theme.palette.common.black, @@ -57,7 +57,7 @@ const Root = styled('div')(({ theme }) => ({ [`& .${classes.graySpan}`]: { fontStyle: 'normal', fontWeight: '400', - fontSize: '18px', + fontSize: theme.typography.pxToRem(18), lineHeight: '133.4%', color: '#909090', }, @@ -65,14 +65,14 @@ const Root = styled('div')(({ theme }) => ({ [`& .${classes.h5}`]: { fontStyle: 'normal', fontWeight: '600', - fontSize: '22px', + fontSize: theme.typography.pxToRem(22), lineHeight: '133.4%', }, [`& .${classes.h3}`]: { fontStyle: 'normal', fontWeight: '500', - fontSize: '25px', + fontSize: theme.typography.pxToRem(25), lineHeight: '116.7%', margin: '0', }, diff --git a/src/components/client/auth/profile/ProfilePage.tsx b/src/components/client/auth/profile/ProfilePage.tsx index e5fda5887..d3b3cc2ab 100644 --- a/src/components/client/auth/profile/ProfilePage.tsx +++ b/src/components/client/auth/profile/ProfilePage.tsx @@ -33,7 +33,7 @@ const StyledLayout = styled(Layout)({ [`& .${classes.h1}`]: { fontStyle: 'normal', fontWeight: 500, - fontSize: '45px', + fontSize: theme.typography.pxToRem(45), lineHeight: '112px', letterSpacing: '-1.5px', color: theme.palette.common.black, diff --git a/src/components/client/auth/register/RegisterPage.tsx b/src/components/client/auth/register/RegisterPage.tsx index eacd700b6..562572800 100644 --- a/src/components/client/auth/register/RegisterPage.tsx +++ b/src/components/client/auth/register/RegisterPage.tsx @@ -33,6 +33,8 @@ import { } from 'gql/user-registration' import RegisterSuccess from './RegisterSuccess' +import theme from 'common/theme' + const providerIcons = { google: , } @@ -146,7 +148,7 @@ export default function RegisterPage({ providers }: RegisterPageProps) { Date: Sun, 17 Mar 2024 11:07:36 +0200 Subject: [PATCH 2/7] Update font sizes --- .../client/campaign-news/secured/NewsAdminPage.tsx | 2 +- src/components/client/campaigns/CampaignDetails.tsx | 6 +++--- src/components/client/campaigns/CampaignsPage.tsx | 8 ++++---- src/components/client/campaigns/DonationWishes.tsx | 2 +- src/components/client/campaigns/InlineDonation.tsx | 2 +- src/components/client/irregularity/helpers/Remark.tsx | 2 +- src/components/client/layout/nav/AdminMenu.tsx | 2 +- src/components/client/layout/nav/PrivateMenu.tsx | 2 +- .../client/notifications/CampaignSubscribeModal.tsx | 2 +- .../client/notifications/GeneralSubscribeModal.tsx | 6 +++--- .../client/notifications/SubscriptionPage.tsx | 4 ++-- src/components/common/FormFieldButton.tsx | 4 ++-- src/components/common/QuillStyleWrapper.tsx | 10 +++++----- src/components/common/navigation/AppBarMenu.tsx | 5 ++++- 14 files changed, 30 insertions(+), 27 deletions(-) diff --git a/src/components/client/campaign-news/secured/NewsAdminPage.tsx b/src/components/client/campaign-news/secured/NewsAdminPage.tsx index 26cd475c0..25143b207 100644 --- a/src/components/client/campaign-news/secured/NewsAdminPage.tsx +++ b/src/components/client/campaign-news/secured/NewsAdminPage.tsx @@ -25,7 +25,7 @@ const classes = { const Root = styled(Layout)({ [`& .${classes.gridColumn}`]: { '& .MuiDataGrid-columnHeaderTitle': { - fontSize: '15px', + fontSize: theme.typography.pxToRem(15), fontWeight: '700', }, }, diff --git a/src/components/client/campaigns/CampaignDetails.tsx b/src/components/client/campaigns/CampaignDetails.tsx index c78e0a6db..c26baf3e3 100644 --- a/src/components/client/campaigns/CampaignDetails.tsx +++ b/src/components/client/campaigns/CampaignDetails.tsx @@ -68,7 +68,7 @@ const StyledGrid = styled(Grid)(({ theme }) => ({ }, ['& .ql-editor']: { - fontSize: theme.spacing(2), + fontSize: theme.typography.pxToRem(16), fontWeight: 500, lineHeight: theme.spacing(4), paddingLeft: '0', @@ -109,10 +109,10 @@ const StyledGrid = styled(Grid)(({ theme }) => ({ }, }, [`& .${classes.financeSummary}`]: { - fontSize: `1.2rem`, + fontSize: theme.typography.pxToRem(19), [theme.breakpoints.up('sm')]: { marginLeft: theme.spacing(2), - fontSize: `1.3rem`, + fontSize: theme.typography.pxToRem(21), }, }, })) diff --git a/src/components/client/campaigns/CampaignsPage.tsx b/src/components/client/campaigns/CampaignsPage.tsx index a99a79a30..3b3d66a63 100644 --- a/src/components/client/campaigns/CampaignsPage.tsx +++ b/src/components/client/campaigns/CampaignsPage.tsx @@ -30,7 +30,7 @@ const Root = styled(Layout)(({ theme }) => ({ fontWeight: '500', color: '#2196F3', fontStyle: 'normal', - fontSize: '45px', + fontSize: theme.typography.pxToRem(45), lineHeight: '45px', alignItems: 'center', textAlign: 'center', @@ -42,7 +42,7 @@ const Root = styled(Layout)(({ theme }) => ({ marginTop: theme.spacing(3), fontStyle: 'normal', fontWeight: '400', - fontSize: '16px', + fontSize: theme.typography.pxToRem(16), lineHeight: '175 %', textAlign: 'center', letterSpacing: '0.15px', @@ -52,7 +52,7 @@ const Root = styled(Layout)(({ theme }) => ({ marginBottom: theme.spacing(3), fontStyle: 'normal', fontWeight: '500', - fontSize: '25px', + fontSize: theme.typography.pxToRem(25), lineHeight: '120%', textAlign: 'center', color: '#2196F3', @@ -66,7 +66,7 @@ const Root = styled(Layout)(({ theme }) => ({ }, [`& .${classes.arrowIcon}`]: { - fontSize: theme.spacing(8), + fontSize: theme.typography.pxToRem(48), }, })) diff --git a/src/components/client/campaigns/DonationWishes.tsx b/src/components/client/campaigns/DonationWishes.tsx index 58bcbe137..8607a6124 100644 --- a/src/components/client/campaigns/DonationWishes.tsx +++ b/src/components/client/campaigns/DonationWishes.tsx @@ -99,7 +99,7 @@ export default function DonationWishes({ campaignId, pageSize = 5 }: Props) { component="h4" sx={{ color: theme.palette.common.black, - fontSize: '2rem', + fontSize: theme.typography.pxToRem(32), paddingBottom: '1rem', }}> {t('campaign.messages')} diff --git a/src/components/client/campaigns/InlineDonation.tsx b/src/components/client/campaigns/InlineDonation.tsx index c41e32b6a..4397b22f5 100644 --- a/src/components/client/campaigns/InlineDonation.tsx +++ b/src/components/client/campaigns/InlineDonation.tsx @@ -118,7 +118,7 @@ const StyledGrid = styled(Grid)(({ theme }) => ({ display: 'flex', justifyContent: 'center', width: '50%', - fontSize: '13px', + fontSize: theme.typography.pxToRem(13), backgroundColor: 'transparant', paddingBottom: theme.spacing(0.2), borderRadius: '60px', diff --git a/src/components/client/irregularity/helpers/Remark.tsx b/src/components/client/irregularity/helpers/Remark.tsx index 184b79935..76303a3a9 100644 --- a/src/components/client/irregularity/helpers/Remark.tsx +++ b/src/components/client/irregularity/helpers/Remark.tsx @@ -5,7 +5,7 @@ type RemarkProps = { } const textStyles = { - fontSize: '13px', + fontSize: theme.typography.pxToRem(13), marginTop: '100px', } diff --git a/src/components/client/layout/nav/AdminMenu.tsx b/src/components/client/layout/nav/AdminMenu.tsx index 794e26f4b..835585027 100644 --- a/src/components/client/layout/nav/AdminMenu.tsx +++ b/src/components/client/layout/nav/AdminMenu.tsx @@ -83,7 +83,7 @@ export default function AdminMenu() { bgcolor: theme.palette.success.light, height: theme.spacing(4.5), width: theme.spacing(4.5), - fontSize: '1rem', + fontSize: theme.typography.pxToRem(16), }}> {lettersAvatar} diff --git a/src/components/client/layout/nav/PrivateMenu.tsx b/src/components/client/layout/nav/PrivateMenu.tsx index 9bbd4cbf2..8e9a11d68 100644 --- a/src/components/client/layout/nav/PrivateMenu.tsx +++ b/src/components/client/layout/nav/PrivateMenu.tsx @@ -76,7 +76,7 @@ export default function PrivateMenu() { bgcolor: theme.palette.success.light, height: theme.spacing(4.5), width: theme.spacing(4.5), - fontSize: '1rem', + fontSize: theme.typography.pxToRem(16), }}> {lettersAvatar} diff --git a/src/components/client/notifications/CampaignSubscribeModal.tsx b/src/components/client/notifications/CampaignSubscribeModal.tsx index fd919cf44..926ca4716 100644 --- a/src/components/client/notifications/CampaignSubscribeModal.tsx +++ b/src/components/client/notifications/CampaignSubscribeModal.tsx @@ -231,7 +231,7 @@ export default function RenderCampaignSubscribeModal({ campaign, setOpen }: Moda style={{ textAlign: 'center', fontSize: 20, fontWeight: 600, paddingBottom: 6 }}> - + - + {t('common:notifications.subscribe-title')} @@ -237,7 +237,7 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { {!isSuccess ? ( - + {t('common:notifications.subscribe-title')} @@ -250,7 +250,7 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { style={{ textAlign: 'center', fontSize: 20, fontWeight: 600, paddingBottom: 6 }}> - + - + - + ({ [`& .${classes.errorText}`]: { color: theme.palette.error.main, fontWeight: 400, - fontSize: '0.75rem', + fontSize: theme.typography.pxToRem(12), lineHeight: 1.66, letterSpacing: '0.03333em', textAlign: 'left', @@ -52,7 +52,7 @@ const Root = styled('div')(({ theme }) => ({ }, [`& .${classes.placeholderText}`]: { color: 'rgba(0, 0, 0, 0.6)', - fontSize: '1rem', + fontSize: theme.typography.pxToRem(16), lineHeight: '1.4375em', letterSpacing: '0.01071em', fontWeight: 400, diff --git a/src/components/common/QuillStyleWrapper.tsx b/src/components/common/QuillStyleWrapper.tsx index c571dd48d..5fd76b003 100644 --- a/src/components/common/QuillStyleWrapper.tsx +++ b/src/components/common/QuillStyleWrapper.tsx @@ -56,25 +56,25 @@ export const QuillStypeWrapper = styled(Grid)(({ theme }) => ({ }, ['.ql-editor, .ql-size-small']: { - fontSize: '.75em', + fontSize: theme.typography.pxToRem(12), }, ['.ql-editor, .ql-size-large']: { - fontSize: '1.5em', + fontSize: theme.typography.pxToRem(24), }, ['.ql-editor, .ql-size-huge']: { - fontSize: '2.5em', + fontSize: theme.typography.pxToRem(40), }, ['.ql-bubble, ql-editor h1']: { position: 'relative', width: '100%', - fontSize: '1em', + fontSize: theme.typography.pxToRem(16), }, ['.ql-bubble, ql-editor h2']: { - fontSize: '1.5em', + fontSize: theme.typography.pxToRem(24), }, ['.ql-bubble .ql-editor a ']: { diff --git a/src/components/common/navigation/AppBarMenu.tsx b/src/components/common/navigation/AppBarMenu.tsx index ca19cf976..351d68dd9 100644 --- a/src/components/common/navigation/AppBarMenu.tsx +++ b/src/components/common/navigation/AppBarMenu.tsx @@ -1,6 +1,9 @@ import { Typography, Box, Toolbar } from '@mui/material' import HomeIcon from '@mui/icons-material/Home' import { IconButton } from '@mui/material' + +import theme from 'common/theme' + type Props = { title: string } @@ -24,7 +27,7 @@ export default function AppBarMenu({ title }: Props) { - + / From 3024ae134bf2f937b8ef5a1095522647e1debe57 Mon Sep 17 00:00:00 2001 From: ani-kalpachka Date: Sun, 17 Mar 2024 11:16:36 +0200 Subject: [PATCH 3/7] Add theme import in Grid component --- src/components/admin/expenses/grid/Grid.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/admin/expenses/grid/Grid.tsx b/src/components/admin/expenses/grid/Grid.tsx index 484bf8528..d0f9f6ef8 100644 --- a/src/components/admin/expenses/grid/Grid.tsx +++ b/src/components/admin/expenses/grid/Grid.tsx @@ -14,6 +14,8 @@ import DetailsModal from './DetailsModal' import DeleteModal from './DeleteModal' import { moneyPublic } from 'common/util/money' +import theme from 'common/theme' + const PREFIX = 'Grid' const classes = { From aaefd08c161b9b06b42c10eada69fcefb5343c05 Mon Sep 17 00:00:00 2001 From: ani-kalpachka Date: Sun, 17 Mar 2024 11:22:46 +0200 Subject: [PATCH 4/7] add theme imports --- src/components/client/campaign-news/secured/NewsAdminPage.tsx | 2 ++ src/components/client/irregularity/helpers/Remark.tsx | 2 ++ src/components/client/notifications/CampaignSubscribeModal.tsx | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/client/campaign-news/secured/NewsAdminPage.tsx b/src/components/client/campaign-news/secured/NewsAdminPage.tsx index 25143b207..8b8970413 100644 --- a/src/components/client/campaign-news/secured/NewsAdminPage.tsx +++ b/src/components/client/campaign-news/secured/NewsAdminPage.tsx @@ -14,6 +14,8 @@ import { routes } from 'common/routes' import AddIcon from '@mui/icons-material/Add' import Link from 'next/link' +import theme from 'common/theme' + const PREFIX = 'NewsAdminPage' const classes = { diff --git a/src/components/client/irregularity/helpers/Remark.tsx b/src/components/client/irregularity/helpers/Remark.tsx index 76303a3a9..e059bc6a0 100644 --- a/src/components/client/irregularity/helpers/Remark.tsx +++ b/src/components/client/irregularity/helpers/Remark.tsx @@ -1,5 +1,7 @@ import { Grid, Typography } from '@mui/material' +import theme from 'common/theme' + type RemarkProps = { text: string } diff --git a/src/components/client/notifications/CampaignSubscribeModal.tsx b/src/components/client/notifications/CampaignSubscribeModal.tsx index 926ca4716..d2ebb584b 100644 --- a/src/components/client/notifications/CampaignSubscribeModal.tsx +++ b/src/components/client/notifications/CampaignSubscribeModal.tsx @@ -218,7 +218,7 @@ export default function RenderCampaignSubscribeModal({ campaign, setOpen }: Moda {!isSuccess ? ( - + {t('common:notifications.subscribe-campaign-title')} From 8638d4f71dfb878dafd6d224badf6e9eb6ffc1b4 Mon Sep 17 00:00:00 2001 From: ani-kalpachka Date: Sun, 17 Mar 2024 11:44:27 +0200 Subject: [PATCH 5/7] Fix lint errors --- .../client/irregularity/steps/Info.tsx | 24 ++++++++++++------- .../layout/nav/AuthLinks/AuthLinks.styled.tsx | 3 ++- .../notifications/CampaignSubscribeModal.tsx | 2 ++ .../notifications/GeneralSubscribeModal.tsx | 4 ++-- .../client/notifications/SubscriptionPage.tsx | 4 +++- src/gql/campaigns.ts | 1 - 6 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/components/client/irregularity/steps/Info.tsx b/src/components/client/irregularity/steps/Info.tsx index 283894b64..873dc92c7 100644 --- a/src/components/client/irregularity/steps/Info.tsx +++ b/src/components/client/irregularity/steps/Info.tsx @@ -13,6 +13,8 @@ import FileList from '../helpers/FileList' import { NotifierTypes } from '../helpers/irregularity.types' import IrregularityReasonSelect from '../helpers/IrregularityReasonSelect' +import theme from 'common/theme' + const CssTextField = styled(FormTextField)({ '& label': { marginLeft: '8px', @@ -42,7 +44,9 @@ export default function Info({ files, setFiles }: Props) { - {t('steps.info.is-donor')} + + {t('steps.info.is-donor')} + @@ -75,7 +79,7 @@ export default function Info({ files, setFiles }: Props) { - + {t('reason.title')} @@ -85,7 +89,9 @@ export default function Info({ files, setFiles }: Props) { - {t('steps.info.content')} + + {t('steps.info.content')} + @@ -93,7 +99,9 @@ export default function Info({ files, setFiles }: Props) { - {t('steps.info.files')} + + {t('steps.info.files')} + - + {t('steps.info.priority-message')} - + {t('steps.info.share-message')} - + {t('steps.info.thanks-message')} - + {t('steps.info.sign')} diff --git a/src/components/client/layout/nav/AuthLinks/AuthLinks.styled.tsx b/src/components/client/layout/nav/AuthLinks/AuthLinks.styled.tsx index 796e19847..28ed994d5 100644 --- a/src/components/client/layout/nav/AuthLinks/AuthLinks.styled.tsx +++ b/src/components/client/layout/nav/AuthLinks/AuthLinks.styled.tsx @@ -1,9 +1,10 @@ import { Box } from '@mui/material' import { styled } from '@mui/material/styles' -import theme from 'common/theme' import LinkButton from 'components/common/LinkButton' +import theme from 'common/theme' + export const AuthLinksWrapper = styled(Box)(() => ({ display: 'flex', alignItems: 'center', diff --git a/src/components/client/notifications/CampaignSubscribeModal.tsx b/src/components/client/notifications/CampaignSubscribeModal.tsx index d2ebb584b..97d08efef 100644 --- a/src/components/client/notifications/CampaignSubscribeModal.tsx +++ b/src/components/client/notifications/CampaignSubscribeModal.tsx @@ -22,6 +22,8 @@ import { email } from 'common/form/validation' import { AcceptNewsLetterFieldCampaign } from 'components/common/form/AcceptNewsletterField' import { routes } from 'common/routes' +import theme from 'common/theme' + const PREFIX = 'CampaignSubscribeModal' const classes = { diff --git a/src/components/client/notifications/GeneralSubscribeModal.tsx b/src/components/client/notifications/GeneralSubscribeModal.tsx index 71d473e3a..0b7a78a5d 100644 --- a/src/components/client/notifications/GeneralSubscribeModal.tsx +++ b/src/components/client/notifications/GeneralSubscribeModal.tsx @@ -163,7 +163,7 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { }}> - + {t('common:notifications.subscribe-title')} @@ -237,7 +237,7 @@ export default function RenderSubscribeModal({ setOpen }: ModalProps) { {!isSuccess ? ( - + {t('common:notifications.subscribe-title')} diff --git a/src/components/client/notifications/SubscriptionPage.tsx b/src/components/client/notifications/SubscriptionPage.tsx index 93f6197e7..c75f2a18b 100644 --- a/src/components/client/notifications/SubscriptionPage.tsx +++ b/src/components/client/notifications/SubscriptionPage.tsx @@ -178,7 +178,9 @@ export default function SubscriptionPage(data: Props) { - + Date: Sun, 17 Mar 2024 12:15:12 +0200 Subject: [PATCH 6/7] Fix lint errors --- src/components/client/notifications/SubscriptionPage.tsx | 2 ++ src/components/common/StyledAccordion.tsx | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/client/notifications/SubscriptionPage.tsx b/src/components/client/notifications/SubscriptionPage.tsx index c75f2a18b..74665b9b3 100644 --- a/src/components/client/notifications/SubscriptionPage.tsx +++ b/src/components/client/notifications/SubscriptionPage.tsx @@ -15,6 +15,8 @@ import { SubscribePublicEmailInput, SubscribePublicEmailResponse } from 'gql/not import { ApiError } from 'next/dist/server/api-utils' import { useSubscribePublicEmail } from 'service/notification' +import theme from 'common/theme' + type Props = { hash: string | null email: string | null diff --git a/src/components/common/StyledAccordion.tsx b/src/components/common/StyledAccordion.tsx index d7ca1a629..841adda34 100644 --- a/src/components/common/StyledAccordion.tsx +++ b/src/components/common/StyledAccordion.tsx @@ -4,7 +4,7 @@ const PREFIX = 'MenuMobile' export const classes = { accordionWrapper: `${PREFIX}-accordionWrapper`, - accordionSummary: `${PREFIX}-accordionSummary`, +accordionSummary: `${PREFIX}-accordionSummary`, menuItem: `${PREFIX}-menuItem`, } From 6c5d5c1a522ee9ba9eaaf5c49d4d9a788c100686 Mon Sep 17 00:00:00 2001 From: ani-kalpachka Date: Sun, 17 Mar 2024 12:22:27 +0200 Subject: [PATCH 7/7] Fix lint error --- src/components/common/StyledAccordion.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/common/StyledAccordion.tsx b/src/components/common/StyledAccordion.tsx index 841adda34..d7ca1a629 100644 --- a/src/components/common/StyledAccordion.tsx +++ b/src/components/common/StyledAccordion.tsx @@ -4,7 +4,7 @@ const PREFIX = 'MenuMobile' export const classes = { accordionWrapper: `${PREFIX}-accordionWrapper`, -accordionSummary: `${PREFIX}-accordionSummary`, + accordionSummary: `${PREFIX}-accordionSummary`, menuItem: `${PREFIX}-menuItem`, }