From ae8e2b4efc7c9be615d9cf4beeba22d47a6f7958 Mon Sep 17 00:00:00 2001 From: Ani Date: Thu, 3 Nov 2022 11:57:34 +0200 Subject: [PATCH] Remove unused code (#1079) * Remove unused component - ReadyToStartCampaignSection * Delete unused Typewritter component --- package.json | 1 - public/locales/bg/index.json | 12 ----- public/locales/en/index.json | 12 ----- src/components/index/IndexPage.tsx | 2 - src/components/index/helpers/Typewriter.tsx | 44 ------------------- .../sections/ReadyToStartCampaignSection.tsx | 41 ----------------- yarn.lock | 8 ---- 7 files changed, 120 deletions(-) delete mode 100644 src/components/index/helpers/Typewriter.tsx delete mode 100644 src/components/index/sections/ReadyToStartCampaignSection.tsx diff --git a/package.json b/package.json index 5449a3214..7e14898e5 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,6 @@ "slick-carousel": "^1.8.1", "slugify": "^1.6.0", "swiper": "^8.1.4", - "typewriter-effect": "2.17.0", "yup": "0.32.9" }, "devDependencies": { diff --git a/public/locales/bg/index.json b/public/locales/bg/index.json index fb47bf0a3..6042c847e 100644 --- a/public/locales/bg/index.json +++ b/public/locales/bg/index.json @@ -3,14 +3,6 @@ "title": "прозрачна онлайн дарителска платформа", "title2": "Подкрепи.бг - прозрачна онлайн дарителска платформа", "metaDescription": "Подкрепи.бг е прозрачна и безплатна онлайн дарителска платформа, създадена от доброволния труд на членовете на сдружение Подкрепи БГ.", - "jumbotron": { - "maximum-transparency": "с максимална степен на прозрачност", - "zero-commission": "с 0% комисиона", - "eliminate-misuse": "целяща да елиминира злоупотребите с дарителски кампании", - "improve-donation-culture": "работеща за по-добра дарителска среда в България", - "open-source": "с отворен за ползване код", - "about-project-button": "За проекта" - }, "activity-section": { "heading": "Какво правим?", "content": "Подкрепи.бг е сдружение от професионалисти, обединени от идеята да създадем безплатна и напълно прозрачна онлайн платформа за дарения, която да може да се ползва свободно от граждани и организации." @@ -45,10 +37,6 @@ "heading": "Как работи Подкрепи.бг?", "text": "Изградихме процес по създаване на кампаниите, който гарантира максимална сигурност за средствата на дарителите и едновременно с това - внимание и подкрепа към нуждите на бенефициентите." }, - "ready-to-start-campaign-section": { - "button": "Създайте кампания", - "text": "Готови ли сте да започнете кампания?" - }, "join-podkrepi-bg-section": { "heading": "Присъединете се към Подкрепи.бг", "text": "За да се присъедините към екипа от доброволци, попълнете формата за кандидатстване с Вашите данни и ние ще се свържем с Вас.", diff --git a/public/locales/en/index.json b/public/locales/en/index.json index d502b82a5..8af2f279d 100644 --- a/public/locales/en/index.json +++ b/public/locales/en/index.json @@ -3,14 +3,6 @@ "title": "a transparent online donation platform", "title2": "Podkrepi.bg - a transparent online donation platform", "metaDescription": "Podkrepi.bg is a transparent online donation platform created by a team of volunteers from the Podkrepi BG organization.", - "jumbotron": { - "maximum-transparency": "with maximum transparency", - "zero-commission": "with 0% commission", - "eliminate-misuse": "aimed at eliminating misuses of donation campaigns", - "improve-donation-culture": "aimed at improving the donation culture in Bulgaria", - "open-source": "open source", - "about-project-button": "About the project" - }, "activity-section": { "heading": "What do we do?", "content": "Podkrepi.bg is an association of professionals united by the idea of creating a free and completely transparent online donation platform, which can be used freely by citizens and organizations." @@ -45,10 +37,6 @@ "heading": "How does Pordkprepi.bg work?", "text": "We have built a process of creating campaigns that ensures maximum security for donor funds and at the same time - attention and support to the needs of beneficiaries." }, - "ready-to-start-campaign-section": { - "button": "Create a campaign", - "text": "Are you ready to start a campaign?" - }, "join-podkrepi-bg-section": { "heading": "Join Podkrepi.bg", "text": "To join the team of volunteers, fill in the application form with your details and we will contact you.", diff --git a/src/components/index/IndexPage.tsx b/src/components/index/IndexPage.tsx index 8611c45f0..3f81a0302 100644 --- a/src/components/index/IndexPage.tsx +++ b/src/components/index/IndexPage.tsx @@ -20,11 +20,9 @@ export default function IndexPage() { - {/* */} - {/* */} ) } diff --git a/src/components/index/helpers/Typewriter.tsx b/src/components/index/helpers/Typewriter.tsx deleted file mode 100644 index a3a442046..000000000 --- a/src/components/index/helpers/Typewriter.tsx +++ /dev/null @@ -1,44 +0,0 @@ -import Typewriter from 'typewriter-effect' -import { useTranslation } from 'next-i18next' - -import { Typography } from '@mui/material' - -export default function Index() { - const { i18n, t } = useTranslation() - - return ( - - { - typewriter - .typeString(t('index:jumbotron.maximum-transparency')) - .pauseFor(1000) - .deleteAll(20) - .typeString(t('index:jumbotron.zero-commission')) - .pauseFor(1000) - .deleteAll(20) - .typeString(t('index:jumbotron.eliminate-misuse')) - .pauseFor(1000) - .deleteAll(20) - .typeString(t('index:jumbotron.improve-donation-culture')) - .pauseFor(1000) - .deleteAll(20) - .typeString(t('index:jumbotron.open-source')) - .pauseFor(1000) - .deleteAll(20) - .start() - }} - options={{ loop: true, delay: 70 }} - /> - - ) -} diff --git a/src/components/index/sections/ReadyToStartCampaignSection.tsx b/src/components/index/sections/ReadyToStartCampaignSection.tsx deleted file mode 100644 index 3ecd5abb2..000000000 --- a/src/components/index/sections/ReadyToStartCampaignSection.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { Box, Container, Grid, Typography } from '@mui/material' -import ChevronRightIcon from '@mui/icons-material/ChevronRight' -import { useTranslation } from 'next-i18next' - -import LinkButton from 'components/common/LinkButton' - -import { routes } from 'common/routes' - -export default function ReadyToStartCampaignSection() { - const { t } = useTranslation() - return ( - - - - - - {t('index:ready-to-start-campaign-section.text')} - - - - }> - {t('index:ready-to-start-campaign-section.button')} - - - - - - ) -} diff --git a/yarn.lock b/yarn.lock index d8287502e..2dacbb380 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7880,14 +7880,6 @@ typescript@4.5.5: resolved "https://registry.npmjs.org/typescript/-/typescript-4.5.5.tgz" integrity sha512-TCTIul70LyWe6IJWT8QSYeA54WQe8EjQFU4wY52Fasj5UKx88LNYKCgBEHcOMOrFF1rKGbD8v/xcNWVUq9SymA== -typewriter-effect@2.17.0: - version "2.17.0" - resolved "https://registry.npmjs.org/typewriter-effect/-/typewriter-effect-2.17.0.tgz" - integrity sha512-cm1By4n2PtClIlyvVtL22BOBxDJZl6dqNqbs5UShteWgX4ovBZG5q2iEIFKG+0JS17O0NXUdtiOSlbQrEnZleg== - dependencies: - prop-types "^15.6.2" - raf "^3.4.0" - unbox-primitive@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz"