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

New design notifications news #1673

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
2d74117
New design for campaign news subscription
RalitsaIlieva Oct 26, 2023
740545a
Merge branch 'master' into new-design-notifications
RalitsaIlieva Oct 30, 2023
8698ee7
format change
RalitsaIlieva Oct 30, 2023
9e6094b
lint fix
RalitsaIlieva Nov 2, 2023
5c5d348
news notifications added
RalitsaIlieva Nov 24, 2023
6c238c6
buttons for notification commented
RalitsaIlieva Dec 11, 2023
cd5939e
Uncommented buttons for notifications
RalitsaIlieva Dec 13, 2023
7689513
Merge branch 'master' into new-design-notifications-news
RalitsaIlieva Dec 13, 2023
0d2ca38
lint fix
RalitsaIlieva Dec 14, 2023
a17dab3
small fixes
RalitsaIlieva Dec 14, 2023
e4d87c8
Merge branch 'master' into new-design-notifications-news
RalitsaIlieva Dec 14, 2023
78fd6dc
[#1554] headings font size bug fixes (#1613)
dzhaniivanov Oct 6, 2023
15eefba
Terms and GDPR added in the registerForm (#1617)
RalitsaIlieva Oct 12, 2023
6e76918
add RalitsaIlieva as a contributor for code (#1618)
allcontributors[bot] Oct 12, 2023
ddbe876
New font Commissioner (#1620)
RalitsaIlieva Oct 13, 2023
108b580
Update BG text for Reports page (#1621)
ani-kalpachka Oct 17, 2023
847e351
Update team members (#1622)
ani-kalpachka Oct 17, 2023
9eb06d0
fix: rounds correctly Donated money value in Statistics section (#1623)
kzhecheva Oct 18, 2023
de14141
build(deps): bump @babel/traverse from 7.22.8 to 7.23.2 (#1624)
dependabot[bot] Oct 22, 2023
6840d3e
Upgrade of translation libraries and related (#1616)
quantum-grit Oct 26, 2023
942d54a
Update mobile Guarantors slider (#1629)
ani-kalpachka Oct 26, 2023
b796a97
Update alignment of Bank details on Donation (mobile) (#1628)
ani-kalpachka Oct 26, 2023
df3c5bb
build(deps): bump crypto-js from 4.1.1 to 4.2.0 (#1630)
dependabot[bot] Oct 26, 2023
0f6bcb9
Upgrade next version to 13.5.4 (#1631)
sashko9807 Oct 27, 2023
a5aefbb
added cookies consent banner (#1634)
dzhaniivanov Oct 29, 2023
ed145c9
Update completed campaigns carousel (#1639)
ani-kalpachka Oct 29, 2023
eba05dd
[Stripe] Add refund functionality (#1635)
Nnachevvv Oct 29, 2023
2ff904b
Show wishes on the top of campaign page (#1633)
kzhecheva Oct 30, 2023
6dec254
Add Finance report for 2022 (#1642)
ani-kalpachka Oct 30, 2023
56330a1
add kzhecheva as a contributor for code (#1643)
allcontributors[bot] Oct 30, 2023
e0c8b3a
format change
RalitsaIlieva Oct 30, 2023
698d81e
lint fix
RalitsaIlieva Nov 2, 2023
5caaf6b
news notifications added
RalitsaIlieva Nov 24, 2023
5a0158e
buttons for notification commented
RalitsaIlieva Dec 11, 2023
70dd2ce
Uncommented buttons for notifications
RalitsaIlieva Dec 13, 2023
0538ff8
Update Cookie consent popup (#1645)
ani-kalpachka Nov 1, 2023
0578ccd
Add check to refund stripe donations only (#1648)
Nnachevvv Nov 6, 2023
225dd35
Adds tests for Wishes and Donors sections on the top of Campaign page…
kzhecheva Nov 7, 2023
f0bfe30
upgrade_sentry_to_7.80 (#1654)
quantum-grit Nov 9, 2023
ef1ceab
github actions update (#1655)
quantum-grit Nov 10, 2023
025b9ab
build(deps): bump actions/setup-node from 3 to 4 (#1656)
dependabot[bot] Nov 10, 2023
1e80034
build(deps): bump actions/checkout from 3 to 4 (#1657)
dependabot[bot] Nov 10, 2023
48925d2
build(deps): bump axios from 0.21.4 to 1.6.0 (#1661)
dependabot[bot] Nov 10, 2023
b38797a
build(deps): bump imranismail/setup-kustomize from 1 to 2 (#1660)
dependabot[bot] Nov 11, 2023
e773f7f
build(deps): bump docker/login-action from 2 to 3 (#1659)
dependabot[bot] Nov 11, 2023
3232d8b
build(deps): bump docker/build-push-action from 3 to 5 (#1658)
dependabot[bot] Nov 11, 2023
857d51e
FIX: Added selfReg prop to the ServerUser obj an use it determinate i…
PetarDimitrov91 Nov 11, 2023
72f3f54
add PetarDimitrov91 as a contributor for code (#1663)
allcontributors[bot] Nov 11, 2023
d7c548e
add kzhecheva as a contributor for code, and test (#1664)
allcontributors[bot] Nov 11, 2023
6ee38ae
disabled button for manual import, added guard in rerun button (#1652)
dzhaniivanov Nov 11, 2023
e4b8d31
[1/2] Affiliate program Integration v1 (#1627)
sashko9807 Nov 15, 2023
2506419
fix: aligns campaignType translation (#1668)
kzhecheva Nov 16, 2023
b6a7242
added campaign donation chart (#1667)
tongo-angelov Nov 16, 2023
38ff221
build(deps): bump sharp from 0.30.7 to 0.32.6 (#1669)
dependabot[bot] Nov 20, 2023
0d2ad1a
Implement fullscreen image slider when image is clicked (#1676)
sashko9807 Dec 3, 2023
a7f5c52
build(deps): bump next-auth from 4.22.1 to 4.24.5 (#1670)
dependabot[bot] Dec 4, 2023
e6a9b31
Remove legacy hotjar implementation (#1678)
sashko9807 Dec 4, 2023
b6f8ada
build(deps): bump @adobe/css-tools from 4.3.1 to 4.3.2 (#1679)
dependabot[bot] Dec 4, 2023
5515062
Update active team members (#1675)
ani-kalpachka Dec 4, 2023
cf2bbd5
one-time-donation/LoginForm.tsx: Refetch useCurrentPerson when logged…
sashko9807 Dec 4, 2023
5238461
make the robots.txt file dynamic (#1680)
Dec 7, 2023
9d5f626
Add new active members (#1681)
ani-kalpachka Dec 10, 2023
0fe9274
lint fix
RalitsaIlieva Dec 14, 2023
0745229
small fixes
RalitsaIlieva Dec 14, 2023
86ddb07
uncommented code in Subscription Section
RalitsaIlieva Dec 15, 2023
89b24aa
Merge branch 'new-design-notifications-news' of https://github.com/Ra…
RalitsaIlieva Dec 15, 2023
a3cbe8f
Unused variables deleted and self-closing tags fix
RalitsaIlieva Dec 15, 2023
2a8c093
format changes
RalitsaIlieva Dec 15, 2023
ef80a6f
e is returned in SubscriptionPage
RalitsaIlieva Dec 15, 2023
1f4204d
fix in expenses table and CheckboxField
RalitsaIlieva Dec 16, 2023
fa04f5c
rearrange in CampaignDetails
RalitsaIlieva Dec 16, 2023
5f8efcb
SubscribeModal removed from TeamSection
RalitsaIlieva Dec 22, 2023
e39e05f
format fix
RalitsaIlieva Dec 22, 2023
be2105a
unused code deleted
RalitsaIlieva Jan 3, 2024
c9cb4f6
removed Grid and SectionGridWrapper in TeamsMemberSection
RalitsaIlieva Jan 3, 2024
c8fca65
format change
RalitsaIlieva Jan 3, 2024
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
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ Watch releases of this repository to be notified about future updates:
## Contributors ✨

<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->

[![All Contributors](https://img.shields.io/badge/all_contributors-76-orange.svg?style=flat-square)](#contributors-)

<!-- ALL-CONTRIBUTORS-BADGE:END -->

Please check [contributors guide](https://github.com/podkrepi-bg/frontend/blob/master/CONTRIBUTING.md) for:
Expand Down
4 changes: 2 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ const moduleExports = {
},
{
source: '/robots.txt',
destination: '/api/robots'
}
destination: '/api/robots',
},
]
},
async redirects() {
Expand Down
2 changes: 2 additions & 0 deletions public/locales/bg/auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@
},
"cta": {
"login": "Вход",
"guest": "Като гост",
"logout": "Изход",
"register": "Регистрация",
"send": "Изпрати",
"reset": "Смени"
},
"fields": {
"email": "Email",
"email-descriptive": "Въведи email адрес",
"password": "Парола",
"confirm-password": "Потвърждение на парола",
"first-name": "Име",
Expand Down
25 changes: 20 additions & 5 deletions public/locales/bg/campaigns.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,14 @@
"save": "Запази",
"submit": "Изпрати",
"apply": "Кандидатствайте",
"subscribe": "Абониране за известия",
"subscribe": "Абонирай се за email известия за кампанията",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion translations for subscriptions, belong more to the notifications.json, but this is more of a personal opinion, rather than change request, thus feel free to leave it as is.

"subscribeFooter": "Абонирай се за бюлетина",
"subscribeGeneral": "Абонирайте се за email известия от Подкрепи.бг",
"subscribe-monthly-newsletter": "Месечен бюлтеин на Подкрепи.бг",
"subscribeGeneralSubtext": "Получавайте нашия месечен бюлетин, в който ще Ви информираме за най-интересните новини от Подкрепи.бг!",
"subscribe-general-monthly-newsletter": "Получавайте нашия месечен бюлетин, за да сте в час най-интересните новини от Подкрепи.бг!",
"subscribeGeneralButton": "Абонирайте се за новини",
"subscribe-general-newsletter-button": "Абонирайте се",
"support": "Дарете",
"support-cause-today": "Подкрепете кауза днес!",
"support-now": "Подкрепете сега",
Expand All @@ -95,10 +102,18 @@
"allow-donation-on-complete": "Разрешете дарения след достигане на сумата"
},
"subscribe": {
"confirm-sent": "Благодарим ви! На посочения e-mail адрес беше изпратено съобщение за потвърждение на вашето абониране.",
"confirm-subscribe": "Благодарим ви! Абонирахте се успешно.",
"subscribe-title": "Абониране за известия и новини от Podkrepi.bg",
"subscribe-campaign-title": "Абониране за известия по тази кампания"
"confirm-sent": "Моля, <strong>активирай</strong> абонамента си от email-a, който ти изпратихме на {{email}}",
"confirm-subscribe": "Записа се успешно.",
"subscribe-title": "Абониране за новините на Подкрепи.бг",
"subscribe-campaign-title": "Абониране за новините по кампанията",
"subscribe-text-nonLoggedUser": "Моля, продължи като гост и въведи email адреса, на който желаеш да получаваш известия за тази кампания, или влез в профила си. Вписвайки се с потребителското си име и парола, ще можеш да управляваш абонамента си от своя Личен профил.",
"subscribe-text-nonLoggedUser-general": "Моля, продължи като гост и въведи email адреса, на който желаеш да получаваш известия от нас, или влез в профила си. Вписвайки се с потребителското си име и парола, ще можеш да управляваш абонамента си от своя Личен профил.",
"subscribe-text-loggedUser": "Моля, избери дали желаеш да получаваш новините за кампанията на email адреса, асоцииран с профила ти, или на алтернативен адрес:",
"subscribe-subtitle": "Искам да получавам новини и известия от Подкрепи.бг на този email адрес:",
"subscribe-campaign-subtTitle": "Искам да получавам новини за кампанията на този email адрес:",
"subscribe-button": "Запиши ме",
"profile-button": "На профилния",
"another-button": "На друг"
},
"campaign": {
"subheading": "Вашата подкрепа променя света и има значение. Всички подкрепящи чрез Подкрепи.бг са наши партньори в подпомагането на кампании за общността. Като щедър дарител Вие ставате важен партньор в подпомагането на кампания за нечие здраве или за успеха на кауза, която ви е близка до сърцето.",
Expand Down
4 changes: 4 additions & 0 deletions public/locales/bg/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"content": "Подкрепи.бг представлява общност от специалисти в областта на програмирането, правото, маркетинга, дизайна, медицината, финансите, социалното предприемачество и др. Обединени сме от целта да създадем устойчива и прозрачна платформа за дарения, която подкрепя каузи и хора в нужда, като заедно с това популяризира и връща доверието към дарителството в България.",
"meet-our-team": "Запознайте се с екипа ни"
},
"subscription-section": {
"heading": "Искаш да си в час с бъдещите ни постижения?",
"content": "Абонирай се за нашия бюлетин и ние ще те информираме за най-важното от живота на Подкрепи.бг. Всеки месец ще получваш email от нас, в който ще ти споделяме най-интересното за кампаниите, които поддържаме, както и за техните организатори и бенефициенти. Ще получаваш новините за нашите партньори, доброволци и дарители в електронната си пощенска кутия. Ако ти звучи добре, запиши се, като въведеш email адреса си тук:"
},
"support-us-section": {
"heading": "Подкрепете ни като:",
"financial-support": "- дарител",
Expand Down
6 changes: 4 additions & 2 deletions public/locales/bg/notifications.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"subscribe": {
"thank-you-msg": "Абонирането за получаване на известия e успешно! Благодарим ❤️",
"subscription-fail": "Възникна проблем при потвърджаването на абонамента за известия 🙄",
"thank-you-msg-heading": "Абонаментът ти е активен!",
"thank-you-msg-text": "Успешно активира своя абонамент. Очаквай новини от нас на {{email}}",
"subscription-fail-heading": "Възникна грешка",
"subscription-fail-text": "Не успяхме да активираме абонамента ти. Моля, опитай пак.",
"cta": "Към сайта",
"cta-retry": "Опитай пак"
},
Expand Down
1 change: 0 additions & 1 deletion public/locales/bg/profile.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"refund": "възстановено",
"cancelled": "отменено",
"guaranteed": "гарантирано"

}
},
"certificates-history": {
Expand Down
1 change: 1 addition & 0 deletions public/locales/bg/validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"agree-terms": "Съгласявам се с Общите условия",
"agree-with": "Съгласявам се с",
"agree-with-newsletter": "Съгласявам се да получавам известия ",
"agree-with-newsletter-campaign": "Съгласявам се да получавам новини за тази кампания и известия от Подкрепи.бг *",
"informed-agree-with": "Запознат съм и се съгласявам с",
"terms-and-conditions": "общите условия",
"gdpr": "политиката за защита на личните данни",
Expand Down
2 changes: 2 additions & 0 deletions public/locales/en/auth.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,15 @@
},
"cta": {
"login": "Login",
"guest": "As guest",
"logout": "Logout",
"register": "Register",
"send": "Send",
"reset": "Reset"
},
"fields": {
"email": "Email",
"email-descriptive": "Fill in your email",
"password": "Password",
"confirm-password": "Confirm Password",
"first-name": "First name",
Expand Down
22 changes: 22 additions & 0 deletions public/locales/en/campaigns.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@
"save": "Save",
"submit": "Submit",
"apply": "Apply",
"subscribe": "Subscribe for email notifications for the campaign",
"subscribeFooter": "Subscribe for the newsletter",
"subscribeGeneral": "Subscribe for email notifications from Podkrepi.bg",
"subscribe-monthly-newsletter": "Monthly newsletter of Podkrepi.bg",
"subscribeGeneralSubtext": "Receive our monthly newsletter which will inform you about the most interesting news from Podkrepi.bg!!",
"subscribe-general-monthly-newsletter": "Receive our monthly newsletter so that you are aware of the most interesting news from Podkrepi.bg!",
"subscribeGeneralButton": "Subscribe for news",
"subscribe-general-newsletter-button": "Subscribe",
"support": "Donate",
"support-cause-today": "Support a campaign today!",
"support-now": "Support now",
Expand All @@ -93,6 +101,20 @@
"attached-files": "Attached files",
"download": "Download"
},
"subscribe": {
"confirm-sent": "Please, <bold>activate</bold> your subscription from the email that we sent to {{email}}",
"confirm-subscribe": "You subscribed successfully",
"subscribe-title": "Subscribe for news from Podkrepi.bg",
"subscribe-campaign-title": "Subscribe for news about the campaign",
"subscribe-text-nonLoggedUser": "Please, proceed as a guest and write down your email, on which you want to receive notifications for this campaign or you can log in. If you log in with your and password you will be able to manage your subscription from your Personal profile",
"subscribe-text-nonLoggedUser-general": "Please, proceed as a guest and write down your email, on which you want to receive notifications from us or you can log in. If you log in with your and password you will be able to manage your subscription from your Personal profile",
"subscribe-text-loggedUser": "Please, choose if you want to receive the news about the campaign on your profile email or on another one:",
"subscribe-subtitle": "I want to receive news and notifications from Podkrepi.bg on this email:",
"subscribe-campaign-subtTitle": "I want to receive news about the campaign on this email:",
"subscribe-button": "Subscribe me",
"profile-button": "On the profile one",
"another-button": "On another one"
},
"campaign": {
"subheading": "Your support for the world matters. All supporters through Podkrepi.bg are our partners in supporting the community campaign. As a generous benefactor, you become an important partner in supporting a campaign regarding someone's health or the success of a cause that is close to your heart.",
"subheading-bold": "Even the slightest help can be the engine of great change",
Expand Down
4 changes: 4 additions & 0 deletions public/locales/en/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"content": "Podkrepi.bg is a community of specialists in the field of programming, law, marketing, design, medicine, finance, social entrepreneurship and others. We are united by the goal of creating a sustainable and transparent donation platform that supports causes and people in need, while promoting and restoring trust in donations in Bulgaria.",
"meet-our-team": "Meet our team"
},
"subscription-section": {
"heading": "You want to know about our future achievements?",
"content": "Subscribe for our newsletter we will infrom you about the most important from the life of Podkrepi.bg. Every month you will receive email from us in which we will share with you the most important things about the campaigns that we have and their organizers and beneficiaries. You will receive news for our partners, volunteers and donors in your email box. If this sounds good for you, subscribe as you fill in your email here:"
},
"support-us-section": {
"heading": "Support us as:",
"financial-support": "- a benefactor",
Expand Down
16 changes: 16 additions & 0 deletions public/locales/en/notifications.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"subscribe": {
"thank-you-msg-heading": "Your subscription is active!",
"thank-you-msg-text": "You successfully activated your subscription. You can wait news from us on {{email}}",
"subscription-fail-heading": "An error occurred",
"subscription-fail-text": "We couldn`t activate your subscription. Please, try again.",
"cta": "To the site",
"cta-retry": "Try again"
},
"unsubscribe": {
"thank-you-msg": "You successfully deactivated your news subscription!",
"subscription-fail": "An error occurred while deactivating your news subscription",
"cta": "To the site",
"cta-retry": "Try again"
}
}
2 changes: 2 additions & 0 deletions public/locales/en/validation.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
"agree-terms": "Agree to the Terms and Conditions",
"agree-with": "I agree to the",
"informed-agree-with": "I understand and I agree to the",
"agree-with-newsletter": "I agree to receive news",
"agree-with-newsletter-campaign": "I agree to receive news about this campaign and news by Podkrepi.bg *",
"terms-and-conditions": "Terms and Conditions",
"gdpr": "General Data Protection Regulation (GDPR)",
"legal-entity": "Legal entity",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import PasswordField from 'components/common/form/PasswordField'
import AcceptPrivacyPolicyField from 'components/common/form/AcceptPrivacyPolicyField'
import AcceptTermsField from 'components/common/form/AcceptTermsField'
import EmailField from 'components/common/form/EmailField'
import AcceptNewsLetterField from 'components/common/form/AcceptNewsletterField'
import { AcceptNewsLetterField } from 'components/common/form/AcceptNewsletterField'

import { AccountType } from 'gql/user-registration'
import { validateEIK13, validateEIK9 } from 'components/common/validations/EIKValidator'
Expand Down
2 changes: 1 addition & 1 deletion src/components/client/auth/register/RegisterForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import PasswordField from 'components/common/form/PasswordField'
import AcceptPrivacyPolicyField from 'components/common/form/AcceptPrivacyPolicyField'
import AcceptTermsField from 'components/common/form/AcceptTermsField'
import EmailField from 'components/common/form/EmailField'
import AcceptNewsLetterField from 'components/common/form/AcceptNewsletterField'
import { AcceptNewsLetterField } from 'components/common/form/AcceptNewsletterField'

import { AccountType } from 'gql/user-registration'
import { IndividualRegisterFormData } from 'gql/user-registration'
Expand Down
49 changes: 47 additions & 2 deletions src/components/client/campaigns/CampaignDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react'
import React, { useState } from 'react'

import { useTranslation } from 'next-i18next'
import dynamic from 'next/dynamic'
Expand Down Expand Up @@ -26,6 +26,8 @@ import { routes } from 'common/routes'
import { useCanEditCampaign } from 'common/hooks/campaigns'
import { moneyPublic } from 'common/util/money'
import CampaignPublicExpensesChart from './CampaignPublicExpensesChart'
import EmailIcon from '@mui/icons-material/Email'
import RenderCampaignSubscribeModal from '../notifications/CampaignSubscribeModal'

const ReactQuill = dynamic(() => import('react-quill'), { ssr: false })
const CampaignNewsSection = dynamic(() => import('./CampaignNewsSection'), { ssr: false })
Expand All @@ -37,6 +39,7 @@ const classes = {
campaignTitle: `${PREFIX}-campaignTitle`,
linkButton: `${PREFIX}-linkButton`,
securityIcon: `${PREFIX}-securityIcon`,
subscribeLink: `${PREFIX}-subscribe`,
financeSummary: `${PREFIX}-financeSummary`,
}

Expand Down Expand Up @@ -93,7 +96,18 @@ const StyledGrid = styled(Grid)(({ theme }) => ({
width: theme.spacing(2.25),
height: theme.spacing(2.75),
},
[`& .${classes.subscribeLink}`]: {
fontWeight: 500,
fontSize: theme.typography.pxToRem(16.5),
textAlign: 'center',

'&:hover': {
textDecoration: 'underline',
transform: 'scale(1.01)',
cursor: 'pointer',
transition: 'all 0.3s ease',
},
},
[`& .${classes.financeSummary}`]: {
fontSize: `1.2rem`,
[theme.breakpoints.up('sm')]: {
Expand All @@ -109,6 +123,7 @@ type Props = {

export default function CampaignDetails({ campaign }: Props) {
const { t } = useTranslation()
const [subscribeIsOpen, setSubscribeOpen] = useState(false)
const sliderImages = campaignSliderUrls(campaign)
const canEditCampaign = useCanEditCampaign(campaign.slug)
const { data: expensesList } = useCampaignApprovedExpensesList(campaign.slug)
Expand All @@ -124,7 +139,22 @@ export default function CampaignDetails({ campaign }: Props) {
showExpensesLink={(expensesList && expensesList?.length > 0) || canEditCampaign}
/>
<Grid container spacing={8}>
<Grid item xs={12}>
{subscribeIsOpen && (
<RenderCampaignSubscribeModal setOpen={setSubscribeOpen} campaign={campaign} />
)}
<Grid item xs={12} display="flex" sx={{ mt: 1.5 }}>
<EmailIcon
color="primary"
fontSize="small"
sx={{ mr: 0.5 }}
onClick={() => setSubscribeOpen(true)}
cursor="pointer"
/>
<Typography onClick={() => setSubscribeOpen(true)} className={classes.subscribeLink}>
{t('campaigns:cta.subscribe')}
</Typography>
</Grid>
<Grid item xs={12} style={{ paddingTop: '20px' }}>
<ReactQuill readOnly theme="bubble" value={campaign.description} />
</Grid>
<Grid item xs={12}>
Expand Down Expand Up @@ -172,6 +202,21 @@ export default function CampaignDetails({ campaign }: Props) {
)}
</Grid>
<CampaignNewsSection campaign={campaign} canCreateArticle={canEditCampaign} />
{subscribeIsOpen && (
<RenderCampaignSubscribeModal setOpen={setSubscribeOpen} campaign={campaign} />
)}
<Grid item xs={12} display="flex" mt={2} mb={2}>
<EmailIcon
color="primary"
fontSize="small"
sx={{ mr: 0.5 }}
onClick={() => setSubscribeOpen(true)}
cursor="pointer"
/>
<Typography onClick={() => setSubscribeOpen(true)} className={classes.subscribeLink}>
{t('campaigns:cta.subscribe')}
</Typography>
</Grid>
<Grid item xs={12} id="wishes">
<DonationWishes campaignId={campaign?.id} />
</Grid>
Expand Down
Loading
Loading