From 5665f95153916504cbe2b3b8d7c4e2e113a97ae1 Mon Sep 17 00:00:00 2001 From: ani-kalpachka Date: Thu, 15 Aug 2024 10:00:47 +0300 Subject: [PATCH 1/2] Update irregularity button on campaign page --- public/locales/bg/campaigns.json | 2 +- public/locales/en/campaigns.json | 2 +- .../client/campaigns/CampaignDetails.tsx | 32 +++++++------------ 3 files changed, 13 insertions(+), 23 deletions(-) diff --git a/public/locales/bg/campaigns.json b/public/locales/bg/campaigns.json index 3c15ca8e0..c42b73e32 100644 --- a/public/locales/bg/campaigns.json +++ b/public/locales/bg/campaigns.json @@ -123,7 +123,7 @@ }, "gallery": "Галерия", "financial-report": "Финансови отчети", - "report-campaign": "Докладвайте кампанията", + "report-campaign": "Подайте сигнал за нередност", "feedback": "Обратна връзка", "beneficiary": { "name": "Бенефициент", diff --git a/public/locales/en/campaigns.json b/public/locales/en/campaigns.json index 820c89e4d..a169a8573 100644 --- a/public/locales/en/campaigns.json +++ b/public/locales/en/campaigns.json @@ -123,7 +123,7 @@ }, "gallery": "Gallery", "financial-report": "Financial report", - "report-campaign": "Report the campaign", + "report-campaign": "Report an irregularity", "feedback": "Feedback", "beneficiary": { "name": "Beneficiary", diff --git a/src/components/client/campaigns/CampaignDetails.tsx b/src/components/client/campaigns/CampaignDetails.tsx index 1afff8217..6a469a677 100644 --- a/src/components/client/campaigns/CampaignDetails.tsx +++ b/src/components/client/campaigns/CampaignDetails.tsx @@ -8,7 +8,7 @@ import { CampaignResponse } from 'gql/campaigns' import 'react-quill/dist/quill.bubble.css' import { Divider, Grid, IconButton, Tooltip, Typography } from '@mui/material' -import SecurityIcon from '@mui/icons-material/Security' +import NotificationsActiveOutlinedIcon from '@mui/icons-material/NotificationsActiveOutlined' import { styled } from '@mui/material/styles' import DonationWishes from './DonationWishes' @@ -38,7 +38,7 @@ const classes = { banner: `${PREFIX}-banner`, campaignTitle: `${PREFIX}-campaignTitle`, linkButton: `${PREFIX}-linkButton`, - securityIcon: `${PREFIX}-securityIcon`, + irregularityIcon: `${PREFIX}-irregularityIcon`, subscribeLink: `${PREFIX}-subscribe`, financeSummary: `${PREFIX}-financeSummary`, } @@ -79,11 +79,11 @@ const StyledGrid = styled(Grid)(({ theme }) => ({ }, [`& .${classes.linkButton}`]: { - fontSize: theme.typography.pxToRem(10), + fontSize: theme.typography.pxToRem(16), letterSpacing: theme.spacing(0.01), lineHeight: '150%', textDecoration: 'underline', - color: 'initial', + color: '#11356A', '&:hover': { textDecoration: 'underline', @@ -92,7 +92,7 @@ const StyledGrid = styled(Grid)(({ theme }) => ({ }, }, - [`& .${classes.securityIcon}`]: { + [`& .${classes.irregularityIcon}`]: { width: theme.spacing(2.25), height: theme.spacing(2.75), }, @@ -221,22 +221,12 @@ export default function CampaignDetails({ campaign }: Props) { - - } - href={'/contact'} - className={classes.linkButton}> - {t('campaigns:campaign.feedback')} - - - - } - href={`/campaigns/${campaign.slug}/irregularity`} - className={classes.linkButton}> - {t('campaigns:campaign.report-campaign')} - - + } + href={`/campaigns/${campaign.slug}/irregularity`} + className={classes.linkButton}> + {t('campaigns:campaign.report-campaign')} + From e827e833b50ce6e6c4c625b3cbf87ef92f4171bc Mon Sep 17 00:00:00 2001 From: ani-kalpachka Date: Thu, 15 Aug 2024 10:09:26 +0300 Subject: [PATCH 2/2] Arrange file imports --- .../client/campaigns/CampaignDetails.tsx | 21 +++++++++---------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/src/components/client/campaigns/CampaignDetails.tsx b/src/components/client/campaigns/CampaignDetails.tsx index 6a469a677..b7f2a6d5e 100644 --- a/src/components/client/campaigns/CampaignDetails.tsx +++ b/src/components/client/campaigns/CampaignDetails.tsx @@ -2,31 +2,30 @@ import React, { useState } from 'react' import { useTranslation } from 'next-i18next' import dynamic from 'next/dynamic' - import { CampaignResponse } from 'gql/campaigns' - import 'react-quill/dist/quill.bubble.css' import { Divider, Grid, IconButton, Tooltip, Typography } from '@mui/material' import NotificationsActiveOutlinedIcon from '@mui/icons-material/NotificationsActiveOutlined' +import EditIcon from '@mui/icons-material/Edit' +import { Assessment, InfoOutlined } from '@mui/icons-material' +import EmailIcon from '@mui/icons-material/Email' import { styled } from '@mui/material/styles' -import DonationWishes from './DonationWishes' import { ImageSlider } from 'components/common/ImageSlider' -import CampaignInfo from './CampaignInfo/CampaignInfo' -import CampaignInfoGraphics from './CampaignInfoGraphics' -import CampaignInfoOperator from './CampaignInfoOperator' import LinkButton from 'components/common/LinkButton' import { campaignSliderUrls } from 'common/util/campaignImageUrls' -import CampaignPublicExpensesGrid from './CampaignPublicExpensesGrid' -import EditIcon from '@mui/icons-material/Edit' import { useCampaignApprovedExpensesList } from 'common/hooks/expenses' -import { Assessment, InfoOutlined } from '@mui/icons-material' -import { routes } from 'common/routes' import { useCanEditCampaign } from 'common/hooks/campaigns' import { moneyPublic } from 'common/util/money' +import { routes } from 'common/routes' + +import DonationWishes from './DonationWishes' +import CampaignInfo from './CampaignInfo/CampaignInfo' +import CampaignInfoGraphics from './CampaignInfoGraphics' +import CampaignInfoOperator from './CampaignInfoOperator' +import CampaignPublicExpensesGrid from './CampaignPublicExpensesGrid' import CampaignPublicExpensesChart from './CampaignPublicExpensesChart' -import EmailIcon from '@mui/icons-material/Email' import RenderCampaignSubscribeModal from '../notifications/CampaignSubscribeModal' const ReactQuill = dynamic(() => import('react-quill'), { ssr: false })