From 6b411e0f09e7938bcb40994409f9651198fddbeb Mon Sep 17 00:00:00 2001 From: Ramin Date: Tue, 6 Jun 2023 17:16:14 +0330 Subject: [PATCH 001/191] refi landing page --- lang/ca.json | 2 + lang/en.json | 2 + lang/es.json | 2 + pages/landings/refi.tsx | 16 +++++ src/components/JoinUsOnDiscord.tsx | 68 +++++++++++++++++++ src/components/particles/Plus.tsx | 34 ++++++++++ .../views/landings/refi/QuoteSection.tsx | 54 +++++++++++++++ src/components/views/landings/refi/index.tsx | 35 ++++++++++ 8 files changed, 213 insertions(+) create mode 100644 pages/landings/refi.tsx create mode 100644 src/components/JoinUsOnDiscord.tsx create mode 100644 src/components/particles/Plus.tsx create mode 100644 src/components/views/landings/refi/QuoteSection.tsx create mode 100644 src/components/views/landings/refi/index.tsx diff --git a/lang/ca.json b/lang/ca.json index bafc07f0da..a2c0d895fb 100644 --- a/lang/ca.json +++ b/lang/ca.json @@ -134,6 +134,8 @@ "component.title.we_hiring": "Estem contractant!", "component.title.support_us": "Donar suport", "component.title.with_your_donation": "amb la teva donació", + "component.join_discord.title": "", + "component.join_discord.body": "", "label.home": "Inici", "label.projects": "Projectes", "label.community": "Comunitat", diff --git a/lang/en.json b/lang/en.json index 71254a037a..aa5536a3a7 100644 --- a/lang/en.json +++ b/lang/en.json @@ -64,6 +64,8 @@ "component.title.we_hiring": "We're Hiring!", "component.title.support_us": "Support us", "component.title.with_your_donation": "with your Donation", + "component.join_discord.title": "We’d love to hear from you on Discord!", + "component.join_discord.body": "Swing by our \uD83D\uDC4B say-hi channel, and we’ll let you know who’s around to meet up. ", "label.home": "Home", "label.projects": "Projects", "label.community": "Community", diff --git a/lang/es.json b/lang/es.json index 7a0ac1d2cc..a8d14627b7 100644 --- a/lang/es.json +++ b/lang/es.json @@ -64,6 +64,8 @@ "component.title.we_hiring": "¡Estamos contratando!", "component.title.support_us": "Apóyanos", "component.title.with_your_donation": "con tu Donación", + "component.join_discord.title": "", + "component.join_discord.body": "", "label.home": "Inicio", "label.projects": "Proyectos", "label.community": "Comunidad", diff --git a/pages/landings/refi.tsx b/pages/landings/refi.tsx new file mode 100644 index 0000000000..d8332241ce --- /dev/null +++ b/pages/landings/refi.tsx @@ -0,0 +1,16 @@ +import { FC } from 'react'; +import Head from 'next/head'; +import ReFiLandingPage from '@/components/views/landings/refi'; + +const ReFiRoute: FC = () => { + return ( + <> + + Giveth - ReFi: Regenerative Finance + + + + ); +}; + +export default ReFiRoute; diff --git a/src/components/JoinUsOnDiscord.tsx b/src/components/JoinUsOnDiscord.tsx new file mode 100644 index 0000000000..d31839a7ee --- /dev/null +++ b/src/components/JoinUsOnDiscord.tsx @@ -0,0 +1,68 @@ +import styled from 'styled-components'; +import { Button, H4, IconChevronRight32 } from '@giveth/ui-design-system'; +import { useIntl } from 'react-intl'; +import ExternalLink from '@/components/ExternalLink'; +import links from '@/lib/constants/links'; +import ArcWithDot from '@/components/particles/ArcWithDot'; +import Plus from '@/components/particles/Plus'; + +const JoinUsOnDiscord = () => { + const { formatMessage } = useIntl(); + return ( + + +

+ {formatMessage({ id: 'component.join_discord.title' })} +

+ + {formatMessage({ id: 'component.join_discord.body' })} + + + + + + Join our community + + + + + + + + + + + + + + + + + +
+ ); +}; + +const ButtonWrapper = styled(FlexCenter)` + margin: 80px 0; +`; + +const IconContainer = styled(Flex)` + align-items: center; + gap: 40px; +`; + +const Body = styled(Lead)` + margin-bottom: 80px; +`; + +const AspectsWrapper = styled.div` + margin-left: 50px; +`; + +const Wrapper = styled.div` + max-width: 1280px; + margin: 80px auto; + padding: 0 40px; +`; + +const H3Styled = styled(H3)` + margin-bottom: 20px; +`; + +const H4Styled = styled(H4)` + margin-bottom: 15px; +`; + +const LeadStyled = styled(Lead)` + margin-bottom: 40px; +`; + +export default ReFiBody; diff --git a/src/components/views/landings/refi/index.tsx b/src/components/views/landings/refi/index.tsx index 84b055e76e..7176be45aa 100644 --- a/src/components/views/landings/refi/index.tsx +++ b/src/components/views/landings/refi/index.tsx @@ -1,16 +1,16 @@ import styled from 'styled-components'; import { neutralColors } from '@giveth/ui-design-system'; -import Header from '@/components/views/landings/web3CryptoDonation/Header'; -import Body from '@/components/views/landings/web3CryptoDonation/Body'; import GetUpdates from '@/components/GetUpdates'; import JoinUsOnDiscord from '@/components/JoinUsOnDiscord'; import QuoteSection from '@/components/views/landings/refi/QuoteSection'; +import ReFiHeader from '@/components/views/landings/refi/ReFiHeader'; +import ReFiBody from '@/components/views/landings/refi/body'; const ReFiLandingPage = () => { return ( -
- + + @@ -30,6 +30,7 @@ const Separator = styled.div` const Wrapper = styled.div` width: 100%; background: white; + overflow: auto; `; export default ReFiLandingPage; diff --git a/src/lib/constants/links.ts b/src/lib/constants/links.ts index 1e16a2decb..58cf220457 100644 --- a/src/lib/constants/links.ts +++ b/src/lib/constants/links.ts @@ -24,6 +24,8 @@ const links = { TWITTER: 'https://twitter.com/giveth', YOUTUBE: 'https://www.youtube.com/givethio', REDDIT: 'https://reddit.com/r/giveth', + INSTAGRAM: 'https://www.instagram.com/giveth.io/', + LINKEDIN: 'https://www.linkedin.com/company/givethio/', DOCS, GIVFARM_DOCS: DOCS + 'giveconomy/givfarm', GIVSTREAM_DOCS: DOCS + 'giveconomy/givstream', From 6340968a7f41886a7a823cce2bf2cc9b2f012821 Mon Sep 17 00:00:00 2001 From: Ramin Date: Sun, 11 Jun 2023 16:44:06 +0330 Subject: [PATCH 003/191] update design system package version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 25080ff373..9d411c294c 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "@ethersproject/contracts": "^5.5.0", "@ethersproject/providers": "^5.5.0", "@ethersproject/units": "^5.5.0", - "@giveth/ui-design-system": "^1.11.8", + "@giveth/ui-design-system": "^1.11.10", "@gnosis.pm/safe-apps-web3-react": "^1.5.0", "@reduxjs/toolkit": "^1.8.1", "@segment/snippet": "^4.15.3", From 53123a17885f6779d0867535df018d6ffa68d389 Mon Sep 17 00:00:00 2001 From: Ramin Date: Wed, 12 Jul 2023 13:50:54 +0330 Subject: [PATCH 004/191] add new production subgraph endpoints --- src/config/production.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config/production.ts b/src/config/production.ts index 3f85c5f611..07c852d352 100644 --- a/src/config/production.ts +++ b/src/config/production.ts @@ -56,7 +56,7 @@ const config: EnvConfig = { blockExplorerName: ['etherscan'], subgraphAddress: - 'https://api.thegraph.com/subgraphs/name/giveth/giveth-economy-second-mainnet', + 'https://gateway.thegraph.com/api/4404c555dda23fe8080ed3cecd8e48cd/subgraphs/id/8Fh5uZkm44L7ma6Jh7JjveV87zvmDkJPuuMZuyvUW9S6', TOKEN_ADDRESS: '0x900db999074d9277c5da2a43f252d74366230da0', tokenAddressOnUniswapV2: '0x900db999074d9277c5da2a43f252d74366230da0', @@ -225,7 +225,7 @@ const config: EnvConfig = { blockExplorerName: ['Blockscout'], subgraphAddress: - 'https://api.thegraph.com/subgraphs/name/giveth/giveth-economy-second-xdai', + 'https://gateway.thegraph.com/api/4404c555dda23fe8080ed3cecd8e48cd/subgraphs/id/ATN3hzfMwQqYMcyrAxqMSrr7Bxf5jKQytWZJpwLigt2p', TOKEN_ADDRESS: '0x4f4F9b8D5B4d0Dc10506e5551B0513B61fD59e75', gGIV_ADDRESS: '0xfFBAbEb49be77E5254333d5fdfF72920B989425f', From 8ef560ed65a16bc56d94297044ffb977daeee2f0 Mon Sep 17 00:00:00 2001 From: Ramin Date: Wed, 12 Jul 2023 14:02:37 +0330 Subject: [PATCH 005/191] rebuild --- src/components/modals/WalletModal.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/src/components/modals/WalletModal.tsx b/src/components/modals/WalletModal.tsx index 94f5cab3ea..40b21e5a22 100644 --- a/src/components/modals/WalletModal.tsx +++ b/src/components/modals/WalletModal.tsx @@ -4,7 +4,6 @@ import { useIntl } from 'react-intl'; import { useWeb3React } from '@web3-react/core'; import styled from 'styled-components'; import { brandColors, H5, Lead, neutralColors } from '@giveth/ui-design-system'; - import { captureException } from '@sentry/nextjs'; import { useRouter } from 'next/router'; import { From 320ab6f91142a85134e88cc411a1bb5d8c830bc7 Mon Sep 17 00:00:00 2001 From: Vy Date: Fri, 14 Jul 2023 16:01:36 +0530 Subject: [PATCH 006/191] fix(copy): project-page --- lang/en.json | 2 +- .../views/project/projectActionCard/DonationSection.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lang/en.json b/lang/en.json index 34213585cc..8fcf1abcc5 100644 --- a/lang/en.json +++ b/lang/en.json @@ -28,7 +28,7 @@ "component.button.subscribe": "SUBSCRIBE", "component.button.tweet_this": "Tweet this", "component.button.your_email_address": "Your email address", - "component.donation_section.100_to_the_project": "100% to the project.", + "component.donation_section.100_to_the_project": "100% goes to the project.", "component.donation_section.desc": "Every donation is peer-to-peer, with no fees and no middlemen.", "component.donation_section.learn_zero_fee": "Learn about our zero-fee policy", "component.givback_eligible.desc": "When you donate to verified projects you qualify to receive GIV tokens. Through GIVbacks, GIV empowers donors with governance rights via the GIVgarden.", diff --git a/src/components/views/project/projectActionCard/DonationSection.tsx b/src/components/views/project/projectActionCard/DonationSection.tsx index c3902926de..40943363a7 100644 --- a/src/components/views/project/projectActionCard/DonationSection.tsx +++ b/src/components/views/project/projectActionCard/DonationSection.tsx @@ -76,7 +76,7 @@ export const DonateSection = () => { id: 'component.donation_section.desc', })}

- + {formatMessage({ From 870a8a3a993f45be9b8ed585dcd13ca98bb03d70 Mon Sep 17 00:00:00 2001 From: Vy Date: Fri, 14 Jul 2023 17:47:47 +0530 Subject: [PATCH 007/191] clean up qf round name --- .../views/project/projectDonations/ProjectTotalFundCard.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/views/project/projectDonations/ProjectTotalFundCard.tsx b/src/components/views/project/projectDonations/ProjectTotalFundCard.tsx index 04c4bfd55f..33e45486bd 100644 --- a/src/components/views/project/projectDonations/ProjectTotalFundCard.tsx +++ b/src/components/views/project/projectDonations/ProjectTotalFundCard.tsx @@ -162,8 +162,7 @@ const ProjectTotalFundCard = ({ selectedQF }: IProjectTotalFundCardProps) => { ) : (
-

Round:  

- QF round {selectedQF.id} donations + {selectedQF.name} donations
{roundDonorsCount && roundDonorsCount > 0 ? (
From 5dfd24daa805abdcf30b591095d53ce37bf45a30 Mon Sep 17 00:00:00 2001 From: Vy Date: Fri, 14 Jul 2023 20:29:33 +0530 Subject: [PATCH 008/191] remove colons --- src/components/project-card/ProjectCard.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/components/project-card/ProjectCard.tsx b/src/components/project-card/ProjectCard.tsx index e95d72f74b..7ccb1de545 100644 --- a/src/components/project-card/ProjectCard.tsx +++ b/src/components/project-card/ProjectCard.tsx @@ -152,7 +152,7 @@ const ProjectCard = (props: IProjectCard) => { )}
- Raised from + {formatMessage({id: 'label.raised_from'}) }   {isRoundActive @@ -171,7 +171,6 @@ const ProjectCard = (props: IProjectCard) => { : countUniqueDonors, }, )} - :
From ff8c73fbe335fa58610170338ea8758452e0ad80 Mon Sep 17 00:00:00 2001 From: Mitch Oz Date: Fri, 14 Jul 2023 11:23:56 -0400 Subject: [PATCH 009/191] fix decimal places for givbacks est. --- src/components/views/project/ProjectGIVbackToast.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/project/ProjectGIVbackToast.tsx b/src/components/views/project/ProjectGIVbackToast.tsx index c315005983..cd093b9847 100644 --- a/src/components/views/project/ProjectGIVbackToast.tsx +++ b/src/components/views/project/ProjectGIVbackToast.tsx @@ -59,7 +59,7 @@ const ProjectGIVbackToast = () => { formatMessage({ id: `project.givback_toast.title.verified_public_1`, }) + - (givbackFactor || 0) * 100 + + Math.round(+(givbackFactor || 0) * 100) + '%' + formatMessage({ id: `project.givback_toast.title.verified_public_2`, From b70436ac60732bbf80a7d84cb0ada349ca0d7faf Mon Sep 17 00:00:00 2001 From: Mitch Oz Date: Fri, 14 Jul 2023 11:48:08 -0400 Subject: [PATCH 010/191] fix learn more text --- lang/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lang/en.json b/lang/en.json index 34213585cc..4342670a9a 100644 --- a/lang/en.json +++ b/lang/en.json @@ -483,7 +483,7 @@ "label.latest_updates": "Latest Updates", "label.learn": "Learn", "label.learn_how_to_become_an_active_part": "Learn how to become an active part of our giving network.", - "label.learn_more": "Go to Passport", + "label.learn_more": "Learn more", "label.learn_more_about": "Learn more about the benefits.", "label.learn_more_about_giv": "Learn more about GIV", "label.leave_feedback": "Leave Feedback", From 3df205a2842d6ee098d1f211c9b07270d590c0b1 Mon Sep 17 00:00:00 2001 From: Cherik Date: Fri, 14 Jul 2023 21:09:59 +0330 Subject: [PATCH 011/191] remove unused copies --- lang/ca.json | 1 - lang/en.json | 1 - lang/es.json | 1 - 3 files changed, 3 deletions(-) diff --git a/lang/ca.json b/lang/ca.json index c096ddc023..891d4d1ec3 100644 --- a/lang/ca.json +++ b/lang/ca.json @@ -653,7 +653,6 @@ "label.project_name": "Nom del projecte", "label.project_official_name": "Nom oficial del projecte", "label.project_social_media": "Xarxes socials del projecte", - "label.project_stats": "", "label.project_status": "", "label.project_story": "Història del projecte", "label.project_verification": "Verificació del projecte", diff --git a/lang/en.json b/lang/en.json index 4342670a9a..8be139d91a 100644 --- a/lang/en.json +++ b/lang/en.json @@ -647,7 +647,6 @@ "label.project_name": "Project Name", "label.project_official_name": "Project official name", "label.project_social_media": "Project Social Media", - "label.project_stats": "Project Stats", "label.project_status": "Project status", "label.project_story": "Project story", "label.project_verification": "Project Verification", diff --git a/lang/es.json b/lang/es.json index 083135aef5..b2f0bf450f 100644 --- a/lang/es.json +++ b/lang/es.json @@ -651,7 +651,6 @@ "label.project_name": "Nombre del Proyecto", "label.project_official_name": "Nombre oficial del proyecto", "label.project_social_media": "Redes sociales del Proyecto", - "label.project_stats": "", "label.project_status": "", "label.project_story": "Historia del proyecto", "label.project_verification": "Verificación del proyecto", From 96443c341cbe680a4191a82afd2dde44d80149ef Mon Sep 17 00:00:00 2001 From: Cherik Date: Fri, 14 Jul 2023 21:10:08 +0330 Subject: [PATCH 012/191] remove title --- .../project/projectActionCard/ProjectStats.tsx | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/src/components/views/project/projectActionCard/ProjectStats.tsx b/src/components/views/project/projectActionCard/ProjectStats.tsx index 108a85909d..b6611fda57 100644 --- a/src/components/views/project/projectActionCard/ProjectStats.tsx +++ b/src/components/views/project/projectActionCard/ProjectStats.tsx @@ -1,10 +1,4 @@ -import { - IconHelpFilled16, - P, - SemiTitle, - Subline, - neutralColors, -} from '@giveth/ui-design-system'; +import { IconHelpFilled16, P, Subline } from '@giveth/ui-design-system'; import React from 'react'; import { useIntl } from 'react-intl'; import styled from 'styled-components'; @@ -27,7 +21,6 @@ export const ProjectStats = () => { ); return (
- {formatMessage({ id: 'label.project_stats' })} @@ -83,13 +76,6 @@ export const ProjectStats = () => { ); }; -const Title = styled(SemiTitle)` - font-weight: 500; - padding-bottom: 16px; - border-bottom: 1px solid ${neutralColors.gray[300]}; - margin-bottom: 16px; -`; - const StatRow = styled(Flex)``; const StatTooltip = styled(Subline)` From e0f7be505df8c06457e7a9b17375b52a3b1bd59b Mon Sep 17 00:00:00 2001 From: Cherik Date: Fri, 14 Jul 2023 21:10:22 +0330 Subject: [PATCH 013/191] inti ProjectActionInnerCard --- .../projectActionCard/ProjectActionCard.tsx | 55 ++++++++----------- 1 file changed, 22 insertions(+), 33 deletions(-) diff --git a/src/components/views/project/projectActionCard/ProjectActionCard.tsx b/src/components/views/project/projectActionCard/ProjectActionCard.tsx index 1ad8d62624..571c0498ce 100644 --- a/src/components/views/project/projectActionCard/ProjectActionCard.tsx +++ b/src/components/views/project/projectActionCard/ProjectActionCard.tsx @@ -31,8 +31,6 @@ interface IWrapper { } export const ProjectActionCard: FC = ({}) => { - const { isLoading } = useAppSelector(state => state.user); - const { isAdmin, hasActiveQFRound } = useProjectContext(); const isMobile = !useMediaQuery(device.tablet); const wrapperRef = useRef(null); const [wrapperHeight, setWrapperHeight] = useState(0); @@ -47,7 +45,7 @@ export const ProjectActionCard: FC = ({}) => { return () => { window.removeEventListener('resize', handleResize); }; - }, [isMobile, isLoading]); + }, [isMobile]); return isMobile ? ( = ({}) => { flexDirection='column-reverse' justifyContent='space-between' > - {isLoading ? ( - - ) : isAdmin ? ( - <> - - - - ) : ( - <> - {hasActiveQFRound ? : } - - - - )} + ) : ( @@ -87,23 +69,30 @@ export const ProjectActionCard: FC = ({}) => { flexDirection='column' justifyContent='space-between' > - {isLoading ? ( - - ) : isAdmin ? ( - <> - - - - ) : ( - <> - {hasActiveQFRound ? : } - - - )} + ); }; +const ProjectActionInnerCard = () => { + const { isLoading } = useAppSelector(state => state.user); + const { isAdmin, hasActiveQFRound } = useProjectContext(); + + return isLoading ? ( + + ) : isAdmin ? ( + <> + + + + ) : ( + <> + {hasActiveQFRound ? : } + + + ); +}; + const ProjectActionCardWrapper = styled(Flex)` background-color: ${neutralColors.gray[100]}; border-radius: 16px; From b0037d0a8dc48bc82f5e8dbbc5496bdd8aa930a1 Mon Sep 17 00:00:00 2001 From: Cherik Date: Fri, 14 Jul 2023 21:16:03 +0330 Subject: [PATCH 014/191] update conditions --- .../project/projectActionCard/ProjectActionCard.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/components/views/project/projectActionCard/ProjectActionCard.tsx b/src/components/views/project/projectActionCard/ProjectActionCard.tsx index 571c0498ce..5553fbe43f 100644 --- a/src/components/views/project/projectActionCard/ProjectActionCard.tsx +++ b/src/components/views/project/projectActionCard/ProjectActionCard.tsx @@ -80,15 +80,12 @@ const ProjectActionInnerCard = () => { return isLoading ? ( - ) : isAdmin ? ( - <> - - - ) : ( <> + {isAdmin && } {hasActiveQFRound ? : } - + {!isAdmin && } + {isAdmin && } ); }; From ed712b7bb57f5a97dc9ee3d85a154b4944072605 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sat, 15 Jul 2023 11:39:13 +0330 Subject: [PATCH 015/191] init dropdown --- src/components/Dropdown.tsx | 78 +++++++++++++++++++ .../projectActionCard/AdminActions.tsx | 20 +++++ 2 files changed, 98 insertions(+) create mode 100644 src/components/Dropdown.tsx diff --git a/src/components/Dropdown.tsx b/src/components/Dropdown.tsx new file mode 100644 index 0000000000..d01d63c49f --- /dev/null +++ b/src/components/Dropdown.tsx @@ -0,0 +1,78 @@ +import { FC, ReactNode, useState } from 'react'; +import styled from 'styled-components'; +import { GLink, neutralColors } from '@giveth/ui-design-system'; +import { Flex } from './styled-components/Flex'; + +interface IDropdownProps { + label: string; + options: IOption[]; +} + +export enum OptionType { + ITEM, + SEPARATOR, +} + +export interface IOption { + type: OptionType; + label: string; + icon?: ReactNode; +} + +export const Dropdown: FC = ({ label, options }) => { + const [open, setOpen] = useState(false); + return ( + + setOpen(_open => !_open)}> + {label} + + {open && } + + ); +}; + +interface IOptionsProps { + options: IOption[]; +} + +const Options: FC = ({ options }) => { + return ( + + {options.map((option, idx) => ( + + ); +}; + +interface IOptionProps { + option: IOption; +} + +const Option: FC = ({ option }) => { + return {option.label}; +}; + +const Wrapper = styled.div` + position: relative; +`; + +const Controller = styled(Flex)` + padding: 8px 16px; + cursor: pointer; + background-color: ${neutralColors.gray[300]}; +`; + +const OptionsWrapper = styled.div` + position: absolute; + top: 100%; + left: 0; + width: 100%; + /* background-color: ${neutralColors.gray[100]}; */ + background-color: red; + border-radius: 16px; + padding: 8px; + margin-top: 8px; +`; + +const OptionWrapper = styled(Flex)``; diff --git a/src/components/views/project/projectActionCard/AdminActions.tsx b/src/components/views/project/projectActionCard/AdminActions.tsx index 95d25b1668..d3ae3b2697 100644 --- a/src/components/views/project/projectActionCard/AdminActions.tsx +++ b/src/components/views/project/projectActionCard/AdminActions.tsx @@ -22,6 +22,25 @@ import { ACTIVATE_PROJECT } from '@/apollo/gql/gqlProjects'; import { useAppDispatch, useAppSelector } from '@/features/hooks'; import { setShowSignWithWallet } from '@/features/modal/modal.slice'; import { showToastError } from '@/lib/helpers'; +import { Dropdown, IOption, OptionType } from '@/components/Dropdown'; + +const options: IOption[] = [ + { + label: 'label.verify_your_project', + type: OptionType.NORMAL, + icon: , + }, + { + label: 'label.deactivate_project', + type: OptionType.NORMAL, + icon: , + }, + { + label: 'label.edit', + type: OptionType.NORMAL, + icon: , + }, +]; export const AdminActions = () => { const [showVerificationModal, setShowVerificationModal] = useState(false); @@ -58,6 +77,7 @@ export const AdminActions = () => { }; return ( <> + Date: Sat, 15 Jul 2023 11:39:29 +0330 Subject: [PATCH 016/191] fix type --- .../views/project/projectActionCard/AdminActions.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/project/projectActionCard/AdminActions.tsx b/src/components/views/project/projectActionCard/AdminActions.tsx index d3ae3b2697..1770d2d62f 100644 --- a/src/components/views/project/projectActionCard/AdminActions.tsx +++ b/src/components/views/project/projectActionCard/AdminActions.tsx @@ -27,17 +27,17 @@ import { Dropdown, IOption, OptionType } from '@/components/Dropdown'; const options: IOption[] = [ { label: 'label.verify_your_project', - type: OptionType.NORMAL, + type: OptionType.ITEM, icon: , }, { label: 'label.deactivate_project', - type: OptionType.NORMAL, + type: OptionType.ITEM, icon: , }, { label: 'label.edit', - type: OptionType.NORMAL, + type: OptionType.ITEM, icon: , }, ]; From b223c5683d2cd4b871c0c22349a4b0df7ed0999f Mon Sep 17 00:00:00 2001 From: Cherik Date: Sat, 15 Jul 2023 11:46:47 +0330 Subject: [PATCH 017/191] handle close --- src/components/Dropdown.tsx | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/src/components/Dropdown.tsx b/src/components/Dropdown.tsx index d01d63c49f..83d1029937 100644 --- a/src/components/Dropdown.tsx +++ b/src/components/Dropdown.tsx @@ -1,4 +1,11 @@ -import { FC, ReactNode, useState } from 'react'; +import { + Dispatch, + FC, + ReactNode, + SetStateAction, + useEffect, + useState, +} from 'react'; import styled from 'styled-components'; import { GLink, neutralColors } from '@giveth/ui-design-system'; import { Flex } from './styled-components/Flex'; @@ -26,16 +33,27 @@ export const Dropdown: FC = ({ label, options }) => { setOpen(_open => !_open)}> {label} - {open && } + {open && } ); }; interface IOptionsProps { options: IOption[]; + setOpen: Dispatch>; } -const Options: FC = ({ options }) => { +const Options: FC = ({ options, setOpen }) => { + useEffect(() => { + const handleClose = (e: MouseEvent) => { + setOpen(false); + }; + + document.addEventListener('mousedown', handleClose); + return () => { + document.removeEventListener('mousedown', handleClose); + }; + }, [setOpen]); return ( {options.map((option, idx) => ( From 98ec019bacc7ac3eb84cb366a1e08580e12178d0 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sat, 15 Jul 2023 11:48:23 +0330 Subject: [PATCH 018/191] fix givback factor --- src/components/views/project/ProjectGIVbackToast.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/project/ProjectGIVbackToast.tsx b/src/components/views/project/ProjectGIVbackToast.tsx index cd093b9847..ca46c79b36 100644 --- a/src/components/views/project/ProjectGIVbackToast.tsx +++ b/src/components/views/project/ProjectGIVbackToast.tsx @@ -43,7 +43,7 @@ const ProjectGIVbackToast = () => { formatMessage({ id: `project.givback_toast.title.verified_owner_1`, }) + - (givbackFactor || 0) * 100 + + ((givbackFactor || 0) * 100).toFixed(2) + '%' + formatMessage({ id: `project.givback_toast.title.verified_owner_2`, From 4a04cc36ed518e9f195af41bc9ef228d979494f4 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sat, 15 Jul 2023 11:54:40 +0330 Subject: [PATCH 019/191] fix build issue --- src/components/UserWithPFPInCell.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/UserWithPFPInCell.tsx b/src/components/UserWithPFPInCell.tsx index a7f3e3f919..ab5055fb8a 100644 --- a/src/components/UserWithPFPInCell.tsx +++ b/src/components/UserWithPFPInCell.tsx @@ -1,12 +1,12 @@ import React, { FC } from 'react'; import styled from 'styled-components'; +import Link from 'next/link'; import { IAdminUser } from '@/apollo/types/types'; import { useGiverPFPToken } from '@/hooks/useGiverPFPToken'; import { Flex } from '@/components/styled-components/Flex'; import { shortenAddress } from '@/lib/helpers'; import { PFP } from './PFP'; import { addressToUserView } from '@/lib/routeCreators'; -import Link from 'next/link'; interface IUserWithPFPInCell { user: IAdminUser; @@ -20,10 +20,16 @@ export const UserWithPFPInCell: FC = ({ user }) => { return pfpToken ? ( - {name || '\u200C'} + + {name || '\u200C'}{' '} + ) : ( - {name || '\u200C'} + + + {name || '\u200C'}{' '} + + ); }; const StyledPFP = styled(PFP)` From 1852b050a4a6d69788c79a8c98727dc0c9d154be Mon Sep 17 00:00:00 2001 From: Cherik Date: Sat, 15 Jul 2023 12:05:58 +0330 Subject: [PATCH 020/191] fix dropdown click --- src/components/Dropdown.tsx | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/src/components/Dropdown.tsx b/src/components/Dropdown.tsx index 83d1029937..b76d95b358 100644 --- a/src/components/Dropdown.tsx +++ b/src/components/Dropdown.tsx @@ -3,12 +3,13 @@ import { FC, ReactNode, SetStateAction, - useEffect, + useRef, useState, } from 'react'; import styled from 'styled-components'; import { GLink, neutralColors } from '@giveth/ui-design-system'; import { Flex } from './styled-components/Flex'; +import { useOnClickOutside } from '@/hooks/useOnClickOutside'; interface IDropdownProps { label: string; @@ -44,18 +45,10 @@ interface IOptionsProps { } const Options: FC = ({ options, setOpen }) => { - useEffect(() => { - const handleClose = (e: MouseEvent) => { - setOpen(false); - }; - - document.addEventListener('mousedown', handleClose); - return () => { - document.removeEventListener('mousedown', handleClose); - }; - }, [setOpen]); + const ddRef = useRef(null); + useOnClickOutside(ddRef, () => setOpen(false)); return ( - + {options.map((option, idx) => (
- {formatMessage({id: 'label.raised_from'}) } + + {formatMessage({ + id: 'label.raised_from', + })}{' '} +   {isRoundActive From c59e33c6014145ff720b6e72e5120dae685e7d91 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 13:12:49 +0330 Subject: [PATCH 033/191] fix prettier issue --- .../views/project/projectActionCard/DonationSection.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/views/project/projectActionCard/DonationSection.tsx b/src/components/views/project/projectActionCard/DonationSection.tsx index 40943363a7..d5f5f12f81 100644 --- a/src/components/views/project/projectActionCard/DonationSection.tsx +++ b/src/components/views/project/projectActionCard/DonationSection.tsx @@ -76,7 +76,12 @@ export const DonateSection = () => { id: 'component.donation_section.desc', })}

-
+ {formatMessage({ From 11dab191eed4963b1d71f16cc59f7dbb66d03e02 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 14:20:32 +0330 Subject: [PATCH 034/191] fix copy --- lang/ca.json | 2 +- lang/en.json | 2 +- lang/es.json | 2 +- src/components/views/projects/ProjectsNoResults.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lang/ca.json b/lang/ca.json index 891d4d1ec3..dcab6339c7 100644 --- a/lang/ca.json +++ b/lang/ca.json @@ -833,7 +833,7 @@ "label.thank_you_for_supporting_project_and_giveth": "", "label.the": "el", "label.the.two": "El", - "label.there_is_no_projects_matching_your_search": "", + "label.there_are_no_projects_matching_your_search": "", "label.these_are_just_simulations": "Són només simulacions.", "label.these_calculators_demonstrate_how_you_can_use_giv": "Aquestes calculadores demostren com pots fer servir GIV per participar en la GIVeconomy!", "label.the_economy_of_giving": "L'economia del \"Giving\"", diff --git a/lang/en.json b/lang/en.json index 93e99daade..c9708b1c20 100644 --- a/lang/en.json +++ b/lang/en.json @@ -823,7 +823,7 @@ "label.thank_you_for_supporting_project_and_giveth": "Thank you for supporting {title} and thanks for your donation to the Giveth DAO! You can check out the Giveth DAO project", "label.the": "the", "label.the.two": "The", - "label.there_is_no_projects_matching_your_search": "There is no projects matching your search", + "label.there_are_no_projects_matching_your_search": "There are no projects matching your search", "label.these_are_just_simulations": "These are just simulations.", "label.these_calculators_demonstrate_how_you_can_use_giv": "These calculators demonstrate how you can use GIV to participate in the GIVeconomy!", "label.the_economy_of_giving": "The Economy of Giving", diff --git a/lang/es.json b/lang/es.json index b2f0bf450f..0480a23199 100644 --- a/lang/es.json +++ b/lang/es.json @@ -828,7 +828,7 @@ "label.thank_you_for_supporting_project_and_giveth": "", "label.the": "el", "label.the.two": "El", - "label.there_is_no_projects_matching_your_search": "", + "label.there_are_no_projects_matching_your_search": "", "label.these_are_just_simulations": "Son solo simulaciones.", "label.these_calculators_demonstrate_how_you_can_use_giv": "Estas calculadoras demuestran como puedes usar GIV para participar en la GIVeconomy!", "label.the_economy_of_giving": "La economia del \"Giving\"", diff --git a/src/components/views/projects/ProjectsNoResults.tsx b/src/components/views/projects/ProjectsNoResults.tsx index 20133a8bdf..ef540c06ba 100644 --- a/src/components/views/projects/ProjectsNoResults.tsx +++ b/src/components/views/projects/ProjectsNoResults.tsx @@ -19,7 +19,7 @@ const ProjectsNoResults = (props: { mainCategories: IMainCategory[] }) => { {formatMessage({ - id: 'label.there_is_no_projects_matching_your_search', + id: 'label.there_are_no_projects_matching_your_search', })} From c792f4937372adc00ae9ed2029fe576b24e7da91 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 14:32:13 +0330 Subject: [PATCH 035/191] fix decimals --- .../views/project/projectActionCard/QFSection.tsx | 6 +++--- .../views/project/projectDonations/ProjectTotalFundCard.tsx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/views/project/projectActionCard/QFSection.tsx b/src/components/views/project/projectActionCard/QFSection.tsx index e0f33e67ac..5d30747b34 100644 --- a/src/components/views/project/projectActionCard/QFSection.tsx +++ b/src/components/views/project/projectActionCard/QFSection.tsx @@ -77,9 +77,9 @@ const QFSection = () => { $ - {( - sumDonationValueUsdForActiveQfRound || 0 - ).toLocaleString(locale)} + {formatDonations( + sumDonationValueUsdForActiveQfRound || 0, + )} {formatMessage({ diff --git a/src/components/views/project/projectDonations/ProjectTotalFundCard.tsx b/src/components/views/project/projectDonations/ProjectTotalFundCard.tsx index 33e45486bd..88c1913a46 100644 --- a/src/components/views/project/projectDonations/ProjectTotalFundCard.tsx +++ b/src/components/views/project/projectDonations/ProjectTotalFundCard.tsx @@ -174,7 +174,7 @@ const ProjectTotalFundCard = ({ selectedQF }: IProjectTotalFundCardProps) => { alignItems='center' > - + {formatDonations(matchFund, '$')} + + {formatDonations(matchFund, '$', true)} {selectedQFData?.isActive From 34c8f4cfe5994d3f54050e8aeb217fec510f73bb Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 14:36:53 +0330 Subject: [PATCH 036/191] fix formatDonations for rounded --- src/helpers/number.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/helpers/number.ts b/src/helpers/number.ts index 7cb96225df..c390bce6dd 100644 --- a/src/helpers/number.ts +++ b/src/helpers/number.ts @@ -51,6 +51,7 @@ export const formatDonations = ( if (amount === 0) { return rounded ? '0' : '0.00'; } - if (amount < 0.01) return `<${symbol}0.01`; + if (rounded && amount < 0.01) return '<${symbol}0.01'; + if (amount < 0.01) return `<${symbol}1`; return !rounded ? symbol + amount.toFixed(2) : symbol + Math.round(amount); }; From ea06e30026e89854ca7800aeaefea0613abb77f2 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 14:37:14 +0330 Subject: [PATCH 037/191] fux typo --- src/helpers/number.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/number.ts b/src/helpers/number.ts index c390bce6dd..478f6ceb35 100644 --- a/src/helpers/number.ts +++ b/src/helpers/number.ts @@ -51,7 +51,7 @@ export const formatDonations = ( if (amount === 0) { return rounded ? '0' : '0.00'; } - if (rounded && amount < 0.01) return '<${symbol}0.01'; + if (rounded && amount < 0.01) return `<${symbol}0.01`; if (amount < 0.01) return `<${symbol}1`; return !rounded ? symbol + amount.toFixed(2) : symbol + Math.round(amount); }; From 1514f6215fb85c9f8e1fd0a4c80da73a9aeeee4d Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 14:50:28 +0330 Subject: [PATCH 038/191] fix translation --- .../views/project/projectActionCard/DonationSection.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/views/project/projectActionCard/DonationSection.tsx b/src/components/views/project/projectActionCard/DonationSection.tsx index d5f5f12f81..3cabcc6dc9 100644 --- a/src/components/views/project/projectActionCard/DonationSection.tsx +++ b/src/components/views/project/projectActionCard/DonationSection.tsx @@ -29,7 +29,9 @@ export const DonateSection = () => { {sumDonationValueUsd && sumDonationValueUsd !== 0 ? ( {isMobile &&
} - Total amount raised + + {formatMessage({ id: 'label.total_amount_raised' })} + {formatDonations(sumDonationValueUsd || 0, '$')} From 598c1dfcdcea9a3a8c30c67e0cac1848ae444bff Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 14:50:38 +0330 Subject: [PATCH 039/191] fix formatDonations for rounded --- src/helpers/number.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/number.ts b/src/helpers/number.ts index 478f6ceb35..5a69abee47 100644 --- a/src/helpers/number.ts +++ b/src/helpers/number.ts @@ -51,7 +51,7 @@ export const formatDonations = ( if (amount === 0) { return rounded ? '0' : '0.00'; } - if (rounded && amount < 0.01) return `<${symbol}0.01`; - if (amount < 0.01) return `<${symbol}1`; + if (rounded && amount < 1) return `<${symbol}1`; + if (amount < 0.01) return `<${symbol}0.01`; return !rounded ? symbol + amount.toFixed(2) : symbol + Math.round(amount); }; From 965a846b9b97ef202bb40a0917f6cb53b7be377b Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 15:58:44 +0330 Subject: [PATCH 040/191] show qf label for non-verified projects --- src/components/project-card/ProjectCard.tsx | 56 +++++++++++---------- 1 file changed, 30 insertions(+), 26 deletions(-) diff --git a/src/components/project-card/ProjectCard.tsx b/src/components/project-card/ProjectCard.tsx index 3754d85e04..14444272da 100644 --- a/src/components/project-card/ProjectCard.tsx +++ b/src/components/project-card/ProjectCard.tsx @@ -201,39 +201,43 @@ const ProjectCard = (props: IProjectCard) => { ) : null} - {verified && ( + {(isRoundActive || verified) && (
- - - - {formatMessage({ - id: 'label.verified', - })} - - + {verified && ( + + + + {formatMessage({ + id: 'label.verified', + })} + + + )} {isRoundActive && ( {activeRound?.name} )} - - - - {projectPower?.powerRank && - projectPower?.totalPower !== 0 - ? `#${projectPower.powerRank}` - : '--'} - - + {verified && ( + + + + {projectPower?.powerRank && + projectPower?.totalPower !== 0 + ? `#${projectPower.powerRank}` + : '--'} + + + )} )} @@ -428,7 +432,7 @@ const AmountRaisedText = styled(Subline)` const QFBadge = styled(Subline)` background-color: ${brandColors.cyan[600]}; color: ${neutralColors.gray[100]}; - padding: 0px 8px; + padding: 4px 8px; border-radius: 16px; display: flex; align-items: center; From db37f4e9646688b712a17031063db70481744554 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 15:58:55 +0330 Subject: [PATCH 041/191] remove unused styles --- src/components/project-card/ProjectCard.tsx | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/components/project-card/ProjectCard.tsx b/src/components/project-card/ProjectCard.tsx index 14444272da..f0c63f7e95 100644 --- a/src/components/project-card/ProjectCard.tsx +++ b/src/components/project-card/ProjectCard.tsx @@ -284,17 +284,6 @@ const VerifiedText = styled(Subline)` color: ${semanticColors.jade[500]}; `; -const GivBackText = styled(Subline)` - text-transform: uppercase; - color: ${brandColors.giv[500]}; -`; - -const GivBackIconContainer = styled.div` - display: flex; - align-items: center; - transform: scale(0.8); -`; - const LastUpdatedContainer = styled(Subline)<{ isHover?: boolean }>` position: absolute; bottom: 30px; From 389e2b433c69000842cf4e2fe3b136e06e6da128 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 16:05:09 +0330 Subject: [PATCH 042/191] fix hover color --- src/components/views/homepage/introBlock/index.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/views/homepage/introBlock/index.tsx b/src/components/views/homepage/introBlock/index.tsx index a40de8c4e7..3c8fb851b6 100644 --- a/src/components/views/homepage/introBlock/index.tsx +++ b/src/components/views/homepage/introBlock/index.tsx @@ -268,6 +268,10 @@ const OurMissionButton = styled(ButtonLink)` display: flex; align-items: center; height: 100%; + transition: color 0.2s ease-in-out; + &:hover { + color: ${brandColors.giv[300]}; + } `; export default IntroBlock; From 0881195404f754e53468f33523f46be3be3e23c4 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 17:23:07 +0330 Subject: [PATCH 043/191] remove unused copies --- lang/ca.json | 2 -- lang/en.json | 2 -- lang/es.json | 2 -- 3 files changed, 6 deletions(-) diff --git a/lang/ca.json b/lang/ca.json index dcab6339c7..f1067aad33 100644 --- a/lang/ca.json +++ b/lang/ca.json @@ -535,8 +535,6 @@ "label.min_one_round": "Mín 1 ronda", "label.mission_vission": "Misió i Visió", "label.more_about_us": "Més sobre nosaltres", - "label.most_funded": "Més finançats", - "label.most_liked": "Més agradats", "label.mtpelerin_pricing_starts_at_zero": "La tarifa de MtPelerin comença en 0%, molt difícil de superar! En general, intentem mantenir la nostra estructura de preus tant atractiva, simple i transparent com sigui possible. Donem a l'usuari la millor taxa de canvi que podem trobar com a comerciants professionals al mercat. Cobrem un petit percentatge a sobre d'aquesta tarifa per sobre dels 500$ per any, per sota d'això no cobrem res.", "label.mtpelerin_ramp": "Ramp Mt Pelerin", "label.multiplier": "Multiplicador", diff --git a/lang/en.json b/lang/en.json index c9708b1c20..136266607a 100644 --- a/lang/en.json +++ b/lang/en.json @@ -531,8 +531,6 @@ "label.min_one_round": "Min 1 round", "label.mission_vission": "Mission & Vision", "label.more_about_us": "More about us", - "label.most_funded": "Most funded", - "label.most_liked": "Most liked", "label.mtpelerin_pricing_starts_at_zero": "MtPelerin's pricing starts at 0%, hard to beat that! Overall, we try to keep our pricing structure as attractive, simple and transparent as possible. We give the user the best exchange rate that we can find as pro traders on the market. We charge a small percentage on top of that rate above $500 per year, below that we don't charge anything.", "label.mtpelerin_ramp": "Mt Pelerin Ramp", "label.multiplier": "Multiplier", diff --git a/lang/es.json b/lang/es.json index 0480a23199..cba8901171 100644 --- a/lang/es.json +++ b/lang/es.json @@ -533,8 +533,6 @@ "label.min_one_round": "Min 1 ronda", "label.mission_vission": "Misión & Visión", "label.more_about_us": "Más acerca de nosotros", - "label.most_funded": "Más financiados", - "label.most_liked": "Más gustados", "label.mtpelerin_pricing_starts_at_zero": "La tarifa de MtPelerin comienza en 0%, ¡muy difícil de superar! En general, tratamos de mantener nuestra estructura de precios lo más atractiva, simple y transparente posible. Damos al usuario la mejor tasa de cambio que podemos encontrar como comerciantes profesionales en el mercado. Cobramos un pequeño porcentaje a esa tarifa cuando se superan los $500 por año, por debajo de eso no cobramos nada.", "label.mtpelerin_ramp": "Ramp Mt Pelerin", "label.multiplier": "Multiplicador", From dbbf8f559f0506ecb90bf3e685818df52879337e Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 17:24:24 +0330 Subject: [PATCH 044/191] update copies --- src/components/views/projects/ProjectsSortSelect.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/projects/ProjectsSortSelect.tsx b/src/components/views/projects/ProjectsSortSelect.tsx index b955515211..c477730199 100644 --- a/src/components/views/projects/ProjectsSortSelect.tsx +++ b/src/components/views/projects/ProjectsSortSelect.tsx @@ -65,12 +65,12 @@ const ProjectsSortSelect = () => { icon: , }, { - label: formatMessage({ id: 'label.most_liked' }), + label: formatMessage({ id: 'label.likes' }), value: EProjectsSortBy.MOST_LIKED, icon: , }, { - label: formatMessage({ id: 'label.most_funded' }), + label: formatMessage({ id: 'label.amount_raised' }), value: EProjectsSortBy.MOST_FUNDED, icon: , }, From 973ffa0df216de060059574fb08a61edc972d332 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 17:43:50 +0330 Subject: [PATCH 045/191] round givback factor --- src/components/views/project/ProjectGIVbackToast.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/views/project/ProjectGIVbackToast.tsx b/src/components/views/project/ProjectGIVbackToast.tsx index ca46c79b36..7a3a4e7c46 100644 --- a/src/components/views/project/ProjectGIVbackToast.tsx +++ b/src/components/views/project/ProjectGIVbackToast.tsx @@ -23,6 +23,7 @@ import { EModalEvents, useModalCallback } from '@/hooks/useModalCallback'; import { isSSRMode } from '@/lib/helpers'; import BoostModal from '@/components/modals/Boost/BoostModal'; import { useAppSelector } from '@/features/hooks'; +import { formatDonations } from '@/helpers/number'; const ProjectGIVbackToast = () => { const { projectData, isAdmin } = useProjectContext(); @@ -43,7 +44,7 @@ const ProjectGIVbackToast = () => { formatMessage({ id: `project.givback_toast.title.verified_owner_1`, }) + - ((givbackFactor || 0) * 100).toFixed(2) + + formatDonations((givbackFactor || 0) * 100, '', true) + '%' + formatMessage({ id: `project.givback_toast.title.verified_owner_2`, From 1dde5f0d72427cde96ff82f26ea4af7158f56a9a Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 17:56:04 +0330 Subject: [PATCH 046/191] add disabled to IOption --- src/components/Dropdown.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/Dropdown.tsx b/src/components/Dropdown.tsx index a5ade3cfa2..dec1641427 100644 --- a/src/components/Dropdown.tsx +++ b/src/components/Dropdown.tsx @@ -32,6 +32,7 @@ export interface IOption { label: string; icon?: ReactNode; cb?: any; + disabled?: boolean; } export const Dropdown: FC = ({ label, options }) => { From b567dab92155ef5e85ba29fb7df8fa7d4e1973c8 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 17:56:37 +0330 Subject: [PATCH 047/191] make verify disable on options --- src/components/views/project/projectActionCard/AdminActions.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/views/project/projectActionCard/AdminActions.tsx b/src/components/views/project/projectActionCard/AdminActions.tsx index 81662b79b7..2f94500a44 100644 --- a/src/components/views/project/projectActionCard/AdminActions.tsx +++ b/src/components/views/project/projectActionCard/AdminActions.tsx @@ -76,6 +76,7 @@ export const AdminActions = () => { type: OptionType.ITEM, icon: , cb: () => setShowVerificationModal(true), + disabled: verified, }, { label: formatMessage({ From 7aa2ba2c0f43d432b3a5e49f7dcbf4a81f24b9c5 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 17:56:58 +0330 Subject: [PATCH 048/191] remove unused styles --- .../projectActionCard/AdminActions.tsx | 44 ------------------- 1 file changed, 44 deletions(-) diff --git a/src/components/views/project/projectActionCard/AdminActions.tsx b/src/components/views/project/projectActionCard/AdminActions.tsx index 2f94500a44..d06e343112 100644 --- a/src/components/views/project/projectActionCard/AdminActions.tsx +++ b/src/components/views/project/projectActionCard/AdminActions.tsx @@ -1,16 +1,10 @@ import { - Button, - ButtonLink, IconArchiving, IconEdit16, IconVerifiedBadge16, - OutlineButton, - brandColors, - semanticColors, } from '@giveth/ui-design-system'; import React, { useState } from 'react'; import { useIntl } from 'react-intl'; -import styled from 'styled-components'; import { captureException } from '@sentry/nextjs'; import { useRouter } from 'next/router'; import { useProjectContext } from '@/context/project.context'; @@ -133,41 +127,3 @@ export const AdminActions = () => { ); }; - -const EditButton = styled(ButtonLink)` - width: 100%; - flex-direction: row-reverse; - gap: 8px; - box-shadow: 0px 3px 20px rgba(83, 38, 236, 0.13); - padding: 16px 24px; - &:hover { - color: ${brandColors.giv[300]}; - } - transition: color 0.3s ease; -`; - -const VerifyButton = styled(OutlineButton)` - width: 100%; - flex-direction: row-reverse; - gap: 8px; - padding: 16px 24px; - color: ${brandColors.giv[500]}; - border: 2px solid ${brandColors.giv[500]}; - &:hover { - border: 2px solid ${brandColors.giv[300]}; - color: ${brandColors.giv[300]}; - } -`; - -const ActiveButton = styled(Button)` - width: 100%; - flex-direction: row-reverse; - gap: 8px; - color: ${semanticColors.golden[700]}; - &:hover { - color: ${semanticColors.golden[500]}; - } - & > div[loading='1'] > div { - left: 0; - } -`; From 535916f83f1ec19760301373d6ab1555396cbcaf Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 17:58:00 +0330 Subject: [PATCH 049/191] hide disabled options --- src/components/Dropdown.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/Dropdown.tsx b/src/components/Dropdown.tsx index dec1641427..b7fbc48b0e 100644 --- a/src/components/Dropdown.tsx +++ b/src/components/Dropdown.tsx @@ -72,9 +72,11 @@ const Options: FC = ({ options, setOpen }) => { useOnClickOutside(ddRef, () => setOpen(false)); return ( - {options.map((option, idx) => ( - ); }; From 1d30bd7093d7f6a09945e71f1f1dd3678bf2464a Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 18:06:33 +0330 Subject: [PATCH 050/191] add qf section tooltip --- lang/en.json | 1 + src/components/views/project/projectActionCard/QFSection.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lang/en.json b/lang/en.json index 136266607a..d605fc3dce 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1379,5 +1379,6 @@ "testfilter": "testfilter", "tooltip.donation.matching": "This estimation is based on the donations made so far this quadratic funding round and is not considering fraud analysis. Actual matching amount vary.", "ubi": "UBI", + "component.qf-section.tooltip": "This estimation is the matching funds that this project would get if the round ended now, disregarding fraud analysis.", "water-and-sanitation": "Water & Sanitation" } diff --git a/src/components/views/project/projectActionCard/QFSection.tsx b/src/components/views/project/projectActionCard/QFSection.tsx index 5d30747b34..6312f18029 100644 --- a/src/components/views/project/projectActionCard/QFSection.tsx +++ b/src/components/views/project/projectActionCard/QFSection.tsx @@ -56,7 +56,7 @@ const QFSection = () => { } direction='top'> {formatMessage({ - id: 'tooltip.donation.matching', + id: 'component.qf-section.tooltip', })} From 5e96aff36a68bba17b4cc48eaf9baf8e56863764 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 18:07:30 +0330 Subject: [PATCH 051/191] remove unused variable --- src/components/views/project/projectActionCard/QFSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/project/projectActionCard/QFSection.tsx b/src/components/views/project/projectActionCard/QFSection.tsx index 6312f18029..94789917f7 100644 --- a/src/components/views/project/projectActionCard/QFSection.tsx +++ b/src/components/views/project/projectActionCard/QFSection.tsx @@ -28,7 +28,7 @@ import { TooltipContent } from '@/components/modals/HarvestAll.sc'; import { formatDonations } from '@/helpers/number'; const QFSection = () => { - const { formatMessage, locale } = useIntl(); + const { formatMessage } = useIntl(); const { projectData } = useProjectContext(); const { estimatedMatching, sumDonationValueUsdForActiveQfRound } = projectData || {}; From 6d489125c6ce30c570ff14125662e3180b1ef621 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 18:10:58 +0330 Subject: [PATCH 052/191] add tooltip copies --- lang/en.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lang/en.json b/lang/en.json index d605fc3dce..9313e38b81 100644 --- a/lang/en.json +++ b/lang/en.json @@ -1380,5 +1380,8 @@ "tooltip.donation.matching": "This estimation is based on the donations made so far this quadratic funding round and is not considering fraud analysis. Actual matching amount vary.", "ubi": "UBI", "component.qf-section.tooltip": "This estimation is the matching funds that this project would get if the round ended now, disregarding fraud analysis.", + "component.project-stats.status.tooltip": "Projects status refers to if the project is active and raising funds, deactivated, canceled or in draft phase.", + "component.project-stats.listing.tooltip": "If a project is listed, it is included on the Projects page, and can be found using our search and filter functions. Unlisted projects can only be found via direct link.", + "component.project-stats.verification.tooltip": "Verified projects have been reviewed by our team and found to be providing a public good, with a history of impact and reputation at stake.", "water-and-sanitation": "Water & Sanitation" } From 57022db3f47e4b8f8869d60f3f653d9caccae441 Mon Sep 17 00:00:00 2001 From: Cherik Date: Sun, 16 Jul 2023 18:11:06 +0330 Subject: [PATCH 053/191] update tooltip contents --- .../project/projectActionCard/ProjectStats.tsx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/components/views/project/projectActionCard/ProjectStats.tsx b/src/components/views/project/projectActionCard/ProjectStats.tsx index b6611fda57..86ea4b4c9c 100644 --- a/src/components/views/project/projectActionCard/ProjectStats.tsx +++ b/src/components/views/project/projectActionCard/ProjectStats.tsx @@ -29,7 +29,11 @@ export const ProjectStats = () => { icon={} direction='bottom' > - Project status + + {formatMessage({ + id: 'component.project-stats.status.tooltip', + })} + @@ -41,7 +45,11 @@ export const ProjectStats = () => { icon={} direction='bottom' > - Listing + + {formatMessage({ + id: 'component.project-stats.listing.tooltip', + })} + @@ -55,7 +63,11 @@ export const ProjectStats = () => { icon={} direction='bottom' > - Verification status + + {formatMessage({ + id: 'component.project-stats.verification.tooltip', + })} + {projectData?.verified ? ( From c0b98aa3794f3bab70b3344132b02e0a9c6ee756 Mon Sep 17 00:00:00 2001 From: Ramin Date: Sun, 16 Jul 2023 18:11:06 +0330 Subject: [PATCH 054/191] #2912 "Go to Projects" instead of passport for eligible QF donors --- src/components/menu/ProjectsItems.tsx | 4 ++-- src/components/views/donate/QFToast.tsx | 8 ++++++-- src/lib/constants/Routes.ts | 1 - 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/components/menu/ProjectsItems.tsx b/src/components/menu/ProjectsItems.tsx index 799e13c1da..3dec21052c 100644 --- a/src/components/menu/ProjectsItems.tsx +++ b/src/components/menu/ProjectsItems.tsx @@ -37,7 +37,7 @@ const projectsItems = { }, { name: 'Quadratic Funding', - url: Routes.QuadraticFunding, + url: Routes.QFProjects, label: 'label.eligible_for_matching', }, // { name: 'Popular', query: '?q=popular' }, @@ -66,7 +66,7 @@ export const ProjectsItems: FC = ({ inSidebar = false }) => { { {description} - +
- + {isRoundActive ? ( - + + {formatDonations( @@ -197,9 +197,9 @@ const ProjectCard = (props: IProjectCard) => { id: 'label.estimated_matching', })} - + ) : null} - + {hasFooter && ( diff --git a/src/components/views/homepage/ProjectsCampaignBlock.tsx b/src/components/views/homepage/ProjectsCampaignBlock.tsx index 76581d22fe..cbdce3eae5 100644 --- a/src/components/views/homepage/ProjectsCampaignBlock.tsx +++ b/src/components/views/homepage/ProjectsCampaignBlock.tsx @@ -113,8 +113,11 @@ const ProjectsCampaignBlock: FC = ({ }; const StyledProjectCard = styled(ProjectCard)` - width: 360px; + width: 340px; margin: 0; + ${mediaQueries.tablet} { + width: 360px !important; + } ${mediaQueries.laptopS} { width: 384px !important; } From fc46932df11f6dffa82b5276b6d888c7a54018ef Mon Sep 17 00:00:00 2001 From: Cherik Date: Mon, 24 Jul 2023 11:08:03 +0330 Subject: [PATCH 119/191] fix input on wheel --- src/components/views/donate/InputBox.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/views/donate/InputBox.tsx b/src/components/views/donate/InputBox.tsx index dc61178c2a..a53e20efe5 100644 --- a/src/components/views/donate/InputBox.tsx +++ b/src/components/views/donate/InputBox.tsx @@ -42,6 +42,7 @@ const InputBox: FC = ({ onBlur={() => onFocus(false)} placeholder={formatMessage({ id: 'label.amount' })} disabled={disabled} + onWheel={e => e.currentTarget.blur()} /> {error && ( From d3dae4341085fa16dc8df911cd04009528bdba64 Mon Sep 17 00:00:00 2001 From: Cherik Date: Mon, 24 Jul 2023 11:19:51 +0330 Subject: [PATCH 120/191] return 15 instead of 0 --- src/components/Input.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Input.tsx b/src/components/Input.tsx index 6f3b3758e4..da0ab9564f 100644 --- a/src/components/Input.tsx +++ b/src/components/Input.tsx @@ -129,7 +129,7 @@ const Input = forwardRef((props, inputRef) => { ); return inputSizeToPaddingLeft(size, !!LeftIcon) + width; } - return 0; + return 15; }, [suffix, value, size, LeftIcon]); const { ref = undefined, ...restRegProps } = From 9b9a76970f29061dfeea75e0082720bff290e515 Mon Sep 17 00:00:00 2001 From: Cherik Date: Mon, 24 Jul 2023 17:28:27 +0330 Subject: [PATCH 121/191] fetch and pass qf rounds in all projects route --- pages/projects/[slug].tsx | 12 ++++++++++++ pages/projects/index.tsx | 25 ++++++++++++++++++++++--- pages/qf/[slug].tsx | 9 ++++++--- pages/qf/index.tsx | 37 +++++-------------------------------- 4 files changed, 45 insertions(+), 38 deletions(-) diff --git a/pages/projects/[slug].tsx b/pages/projects/[slug].tsx index af30db2656..ef385d4ece 100644 --- a/pages/projects/[slug].tsx +++ b/pages/projects/[slug].tsx @@ -12,6 +12,7 @@ import ProjectsIndex from '@/components/views/projects/ProjectsIndex'; import { useReferral } from '@/hooks/useReferral'; import { projectsMetatags } from '@/content/metatags'; import { ProjectsProvider } from '@/context/projects.context'; +import { FETCH_QF_ROUNDS } from '@/apollo/gql/gqlQF'; import type { IProjectsRouteProps } from '.'; interface IProjectsCategoriesRouteProps extends IProjectsRouteProps { @@ -25,13 +26,17 @@ const ProjectsCategoriesRoute = (props: IProjectsCategoriesRouteProps) => { selectedMainCategory, totalCount, categories, + qfRounds, } = props; + useReferral(); return ( { fetchPolicy: 'network-only', }); const { projects, totalCount, categories } = data.allProjects; + const { + data: { qfRounds }, + } = await apolloClient.query({ + query: FETCH_QF_ROUNDS, + fetchPolicy: 'network-only', + }); return { props: { projects, @@ -102,6 +113,7 @@ export const getServerSideProps: GetServerSideProps = async context => { selectedMainCategory: updatedSelectedMainCategory, totalCount, categories, + qfRounds, }, }; } diff --git a/pages/projects/index.tsx b/pages/projects/index.tsx index 7c6486666a..fb57fb0b92 100644 --- a/pages/projects/index.tsx +++ b/pages/projects/index.tsx @@ -10,23 +10,35 @@ import { projectsMetatags } from '@/content/metatags'; import { GeneralMetatags } from '@/components/Metatag'; import { useReferral } from '@/hooks/useReferral'; import { transformGraphQLErrorsToStatusCode } from '@/helpers/requests'; -import { ICategory, IMainCategory, IProject } from '@/apollo/types/types'; +import { + ICategory, + IMainCategory, + IProject, + IQFRound, +} from '@/apollo/types/types'; import { ProjectsProvider } from '@/context/projects.context'; +import { FETCH_QF_ROUNDS } from '@/apollo/gql/gqlQF'; export interface IProjectsRouteProps { projects: IProject[]; totalCount: number; categories: ICategory[]; mainCategories: IMainCategory[]; + qfRounds: IQFRound[]; } const ProjectsRoute = (props: IProjectsRouteProps) => { - const { projects, mainCategories, totalCount, categories } = props; + const { projects, mainCategories, totalCount, categories, qfRounds } = + props; useReferral(); return ( - + { const updatedMaincategory = [allCategoriesItem, ...mainCategories]; const { projects, totalCount, categories } = data.allProjects; + const { + data: { qfRounds }, + } = await apolloClient.query({ + query: FETCH_QF_ROUNDS, + fetchPolicy: 'network-only', + }); return addApolloState(apolloClient, { props: { projects, mainCategories: updatedMaincategory, totalCount, categories, + qfRounds, }, }); } catch (error: any) { diff --git a/pages/qf/[slug].tsx b/pages/qf/[slug].tsx index 2acc4d3de9..b7c05d43c0 100644 --- a/pages/qf/[slug].tsx +++ b/pages/qf/[slug].tsx @@ -12,13 +12,14 @@ import ProjectsIndex from '@/components/views/projects/ProjectsIndex'; import { projectsMetatags } from '@/content/metatags'; import { ProjectsProvider } from '@/context/projects.context'; import { FETCH_QF_ROUNDS } from '@/apollo/gql/gqlQF'; -import type { IQFProjectsRouteProps } from '.'; +import { useReferral } from '@/hooks/useReferral'; +import { IProjectsRouteProps } from 'pages/projects'; -interface IQFProjectsCategoriesRouteProps extends IQFProjectsRouteProps { +interface IProjectsCategoriesRouteProps extends IProjectsRouteProps { selectedMainCategory: IMainCategory; } -const QFProjectsCategoriesRoute = (props: IQFProjectsCategoriesRouteProps) => { +const QFProjectsCategoriesRoute = (props: IProjectsCategoriesRouteProps) => { const { projects, mainCategories, @@ -28,6 +29,8 @@ const QFProjectsCategoriesRoute = (props: IQFProjectsCategoriesRouteProps) => { qfRounds, } = props; + useReferral(); + return ( { +const QFProjectsRoute = (props: IProjectsRouteProps) => { const { projects, mainCategories, totalCount, categories, qfRounds } = props; - const router = useRouter(); - const referrerId = router?.query?.referrer_id; - - useEffect(() => { - if (referrerId) { - // this sets the cookie saying this session comes from a referal - setWithExpiry( - StorageLabel.CHAINVINEREFERRED, - referrerId, - 1 * 24 * 60 * 60, - ); - } - }, [referrerId]); + useReferral(); return ( Date: Mon, 24 Jul 2023 17:29:02 +0330 Subject: [PATCH 122/191] handle isQF in projects context --- src/context/projects.context.tsx | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/context/projects.context.tsx b/src/context/projects.context.tsx index b032c07126..dd315df452 100644 --- a/src/context/projects.context.tsx +++ b/src/context/projects.context.tsx @@ -25,8 +25,9 @@ interface IProjectsContext { setVariables: Dispatch>; mainCategories: IMainCategory[]; selectedMainCategory?: IMainCategory; - isQF: boolean; qfRounds: IQFRound[]; + isQF: boolean; + setIsQF: Dispatch>; } const variablesDefaultValue = { @@ -43,8 +44,9 @@ const ProjectsContext = createContext({ variables: variablesDefaultValue, setVariables: () => console.log('setVariables not initialed yet!'), mainCategories: [], - isQF: false, qfRounds: [], + isQF: false, + setIsQF: () => console.log('setIsQF not initialed yet!'), }); ProjectsContext.displayName = 'ProjectsContext'; @@ -53,12 +55,14 @@ export const ProjectsProvider = (props: { children: ReactNode; mainCategories: IMainCategory[]; selectedMainCategory?: IMainCategory; - isQF?: boolean; - qfRounds?: IQFRound[]; + qfRounds: IQFRound[]; + isQF: boolean; }) => { const { children, mainCategories, selectedMainCategory, isQF, qfRounds } = props; + const [_isQF, setIsQF] = useState(isQF); + const [variables, setVariables] = useState( isQF ? variablesDefaultValueWithQF : variablesDefaultValue, ); @@ -105,7 +109,7 @@ export const ProjectsProvider = (props: { ) as EProjectsFilter[]; } - if (isQF) { + if (_isQF) { filters ? filters.push(EProjectsFilter.ACTIVE_QF_ROUND) : (filters = [EProjectsFilter.ACTIVE_QF_ROUND]); @@ -141,7 +145,7 @@ export const ProjectsProvider = (props: { router.query.filter, router.query.campaign, router.query?.slug, - isQF, + _isQF, ]); return ( @@ -151,8 +155,9 @@ export const ProjectsProvider = (props: { setVariables, mainCategories, selectedMainCategory, - isQF: isQF || false, qfRounds: qfRounds || [], + isQF: _isQF || false, + setIsQF, }} > {children} From 680384db81ad769da7b7749d3e0015913b757994 Mon Sep 17 00:00:00 2001 From: Cherik Date: Mon, 24 Jul 2023 17:29:28 +0330 Subject: [PATCH 123/191] add qf item --- src/components/menu/FilterMenu.tsx | 71 ++++++++++--------- .../views/projects/ProjectsFiltersButton.tsx | 2 +- 2 files changed, 40 insertions(+), 33 deletions(-) diff --git a/src/components/menu/FilterMenu.tsx b/src/components/menu/FilterMenu.tsx index a3b8f88f60..10b7001223 100644 --- a/src/components/menu/FilterMenu.tsx +++ b/src/components/menu/FilterMenu.tsx @@ -57,7 +57,7 @@ const fundsFilter = [ export const FilterMenu = forwardRef( ({ handleClose, isOpen }, ref) => { const { formatMessage } = useIntl(); - const { setVariables, variables, isQF } = useProjectsContext(); + const { setVariables, variables, isQF, setIsQF } = useProjectsContext(); const filtersCount = variables?.filters?.length ?? 0; const campaignCount = variables?.campaignSlug ? 1 : 0; const count = filtersCount + campaignCount - (isQF ? 1 : 0); @@ -108,37 +108,44 @@ export const FilterMenu = forwardRef(
- {!isQF && ( - <> - - {formatMessage({ - id: 'label.project_features', - })} - - {projectsFeatures.map((projectFeature, idx) => ( - - { - handleSelectFilter( - e, - projectFeature.value, - ); - }} - checked={ - variables?.filters?.includes( - projectFeature.value, - ) ?? false - } - size={14} - /> - - ))} - - )} + + {formatMessage({ + id: 'label.project_features', + })} + + {projectsFeatures.map((projectFeature, idx) => ( + + { + handleSelectFilter(e, projectFeature.value); + }} + checked={ + variables?.filters?.includes( + projectFeature.value, + ) ?? false + } + size={14} + /> + + ))} + + { + handleClose(e); + setIsQF(isQF => !isQF); + }} + checked={isQF} + size={14} + /> + + {formatMessage({ id: 'label.accepts_funds_on' })} {fundsFilter.map((projectFeature, idx) => ( diff --git a/src/components/views/projects/ProjectsFiltersButton.tsx b/src/components/views/projects/ProjectsFiltersButton.tsx index 97b14e1ab9..c9676fe1ff 100644 --- a/src/components/views/projects/ProjectsFiltersButton.tsx +++ b/src/components/views/projects/ProjectsFiltersButton.tsx @@ -22,7 +22,7 @@ const ProjectsFiltersButton = () => { useOnClickOutside(filterMenuRef, () => setIsFilterOpen(false)); const handleFilterClose = (e: MouseEvent) => { - e.stopPropagation(); + e.stopPropagation && e.stopPropagation(); setIsFilterOpen(false); }; From 51f0f3b6a8c56434f3ad240595e244e61ac88ee6 Mon Sep 17 00:00:00 2001 From: Cherik Date: Mon, 24 Jul 2023 17:31:44 +0330 Subject: [PATCH 124/191] fix counts --- src/components/menu/FilterMenu.tsx | 2 +- src/components/views/projects/ProjectsFiltersButton.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/menu/FilterMenu.tsx b/src/components/menu/FilterMenu.tsx index 10b7001223..8c6939a78b 100644 --- a/src/components/menu/FilterMenu.tsx +++ b/src/components/menu/FilterMenu.tsx @@ -60,7 +60,7 @@ export const FilterMenu = forwardRef( const { setVariables, variables, isQF, setIsQF } = useProjectsContext(); const filtersCount = variables?.filters?.length ?? 0; const campaignCount = variables?.campaignSlug ? 1 : 0; - const count = filtersCount + campaignCount - (isQF ? 1 : 0); + const count = filtersCount + campaignCount; const router = useRouter(); const handleSelectFilter = (e: boolean, filter: EProjectsFilter) => { diff --git a/src/components/views/projects/ProjectsFiltersButton.tsx b/src/components/views/projects/ProjectsFiltersButton.tsx index c9676fe1ff..66da1f8a62 100644 --- a/src/components/views/projects/ProjectsFiltersButton.tsx +++ b/src/components/views/projects/ProjectsFiltersButton.tsx @@ -13,7 +13,7 @@ const ProjectsFiltersButton = () => { const [isFilterOpen, setIsFilterOpen] = useState(false); const filtersCount = variables?.filters?.length ?? 0; const campaignCount = variables?.campaignSlug ? 1 : 0; - const count = filtersCount + campaignCount - (isQF ? 1 : 0); + const count = filtersCount + campaignCount; const delayedIsFilterOpen = useDelay(isFilterOpen, 280); From c8c5324f472d2011206f02fc10c477c4abe5612d Mon Sep 17 00:00:00 2001 From: Cherik Date: Mon, 24 Jul 2023 17:33:38 +0330 Subject: [PATCH 125/191] disable check box in qf route --- src/components/menu/FilterMenu.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/menu/FilterMenu.tsx b/src/components/menu/FilterMenu.tsx index 8c6939a78b..0ab5a85367 100644 --- a/src/components/menu/FilterMenu.tsx +++ b/src/components/menu/FilterMenu.tsx @@ -141,6 +141,7 @@ export const FilterMenu = forwardRef( handleClose(e); setIsQF(isQF => !isQF); }} + disabled={router.pathname === '/qf'} checked={isQF} size={14} /> From 961b8b28f3eb2dc821e7f37552beb750a9cdfc23 Mon Sep 17 00:00:00 2001 From: Cherik Date: Tue, 25 Jul 2023 11:53:13 +0330 Subject: [PATCH 126/191] add UNKOWN log --- public/images/tokens/UNKOWN.svg | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 public/images/tokens/UNKOWN.svg diff --git a/public/images/tokens/UNKOWN.svg b/public/images/tokens/UNKOWN.svg new file mode 100644 index 0000000000..0a90035520 --- /dev/null +++ b/public/images/tokens/UNKOWN.svg @@ -0,0 +1,6 @@ + + + + + + From 37a19a6c2f0e2b661491ab52f5bcd0e7ec095c29 Mon Sep 17 00:00:00 2001 From: Cherik Date: Tue, 25 Jul 2023 11:53:32 +0330 Subject: [PATCH 127/191] show UNKOWN logo instead of eth logo for user with no logo --- src/components/views/donate/TokenPicker.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/donate/TokenPicker.tsx b/src/components/views/donate/TokenPicker.tsx index f0057a5c54..b9f5fb587b 100644 --- a/src/components/views/donate/TokenPicker.tsx +++ b/src/components/views/donate/TokenPicker.tsx @@ -48,7 +48,7 @@ const ImageIcon = (props: { symbol: string }) => { require(`../../../../public/images/tokens/${symbol?.toUpperCase()}.svg`); image_path = `/images/tokens/${symbol?.toUpperCase()}.svg`; } catch (err) { - image_path = '/images/tokens/ETH.svg'; //set default image path + image_path = '/images/tokens/UNKOWN.svg'; //set default image path } return {symbol}; }; From 0b59db75e66f52dd1456e03d75a9c2e4c27be528 Mon Sep 17 00:00:00 2001 From: Cherik Date: Tue, 25 Jul 2023 12:04:20 +0330 Subject: [PATCH 128/191] handle no photo in react way --- src/components/views/donate/TokenPicker.tsx | 29 +++++++++++++-------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/src/components/views/donate/TokenPicker.tsx b/src/components/views/donate/TokenPicker.tsx index b9f5fb587b..95f62b9c80 100644 --- a/src/components/views/donate/TokenPicker.tsx +++ b/src/components/views/donate/TokenPicker.tsx @@ -1,4 +1,4 @@ -import { useState } from 'react'; +import { FC, useState } from 'react'; import { neutralColors, P, @@ -41,16 +41,23 @@ declare module 'react-select/dist/declarations/src/Select' { } } -const ImageIcon = (props: { symbol: string }) => { - const { symbol } = props; - let image_path = ''; - try { - require(`../../../../public/images/tokens/${symbol?.toUpperCase()}.svg`); - image_path = `/images/tokens/${symbol?.toUpperCase()}.svg`; - } catch (err) { - image_path = '/images/tokens/UNKOWN.svg'; //set default image path - } - return {symbol}; +interface IImageIconProps { + symbol: string; +} + +const ImageIcon: FC = ({ symbol }) => { + const [src, setSrc] = useState( + `/images/tokens/${symbol?.toUpperCase()}.svg`, + ); + return ( + {symbol} setSrc('/images/tokens/UNKOWN.svg')} + /> + ); }; const MenuList = (props: MenuListProps) => { From 35e36d55e5cbbd4f2671047ecff574b63033112a Mon Sep 17 00:00:00 2001 From: Ramin Date: Tue, 25 Jul 2023 19:55:15 +0330 Subject: [PATCH 129/191] update version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 385f9477d9..34b7a42d9b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "givethdapp", - "version": "2.17.2", + "version": "2.17.3", "private": true, "scripts": { "build": "next build", From 8fdda2e2fe9199871d489b65aeada23527bcb3af Mon Sep 17 00:00:00 2001 From: Ramin Date: Tue, 25 Jul 2023 20:20:41 +0330 Subject: [PATCH 130/191] update refi header --- .../views/landings/refi/ReFiHeader.tsx | 43 ++++++++++++++++--- 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/src/components/views/landings/refi/ReFiHeader.tsx b/src/components/views/landings/refi/ReFiHeader.tsx index 246743c0be..cb893c9750 100644 --- a/src/components/views/landings/refi/ReFiHeader.tsx +++ b/src/components/views/landings/refi/ReFiHeader.tsx @@ -1,20 +1,50 @@ import styled from 'styled-components'; import { H1 } from '@giveth/ui-design-system'; +import { brandColors } from '@giveth/ui-design-system/lib/esm/common/colors'; +import Wave from '@/components/particles/Wave'; +import { mediaQueries } from '@/lib/constants/constants'; const ReFiHeader = () => { return ( -

- ReFi: Regenerative Finance, Our Hope for the Planet -

+ + <H1 weight={700}> + ReFi: Regenerative Finance, Our Hope for the Planet + </H1> + + + +
); }; +const WaveWrapper = styled.div` + position: absolute; + left: 0; + top: 254px; +`; + +const Title = styled.div` + padding: 40px; + background: white; + margin: 20px; + color: ${brandColors.giv[700]}; + border-radius: 16px; + max-width: 910px; + z-index: 1; + ${mediaQueries.tablet} { + margin: 50px; + } +`; + const OuterWrapper = styled.div` - padding: 0 40px; + padding: 0 10px; + ${mediaQueries.tablet} { + padding: 0 40px; + } `; const Wrapper = styled.div` @@ -23,11 +53,12 @@ const Wrapper = styled.div` border-radius: 16px; background-image: url('/images/banners/categories/all.png'); background-size: cover; - height: 530px; + height: 630px; width: 100%; color: white; display: flex; - align-items: center; + position: relative; + align-items: flex-end; > h1 { margin: 0 50px; } From 0646b19b48db5276bda2415a4bc680c7ee7b48d0 Mon Sep 17 00:00:00 2001 From: Ramin Date: Tue, 25 Jul 2023 20:30:53 +0330 Subject: [PATCH 131/191] update refi header background --- src/components/views/landings/refi/ReFiHeader.tsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/components/views/landings/refi/ReFiHeader.tsx b/src/components/views/landings/refi/ReFiHeader.tsx index cb893c9750..227d81c1a6 100644 --- a/src/components/views/landings/refi/ReFiHeader.tsx +++ b/src/components/views/landings/refi/ReFiHeader.tsx @@ -1,6 +1,9 @@ import styled from 'styled-components'; import { H1 } from '@giveth/ui-design-system'; -import { brandColors } from '@giveth/ui-design-system/lib/esm/common/colors'; +import { + brandColors, + neutralColors, +} from '@giveth/ui-design-system/lib/esm/common/colors'; import Wave from '@/components/particles/Wave'; import { mediaQueries } from '@/lib/constants/constants'; @@ -41,15 +44,16 @@ const Title = styled.div` `; const OuterWrapper = styled.div` - padding: 0 10px; + background: ${neutralColors.gray[200]}; + padding: 40px 10px; ${mediaQueries.tablet} { - padding: 0 40px; + padding: 40px; } `; const Wrapper = styled.div` max-width: 1200px; - margin: 80px auto; + margin: 0 auto; border-radius: 16px; background-image: url('/images/banners/categories/all.png'); background-size: cover; From a6839a5fb8471f6e0bb9de09141f08760af01bd4 Mon Sep 17 00:00:00 2001 From: Ramin Date: Tue, 25 Jul 2023 23:39:18 +0330 Subject: [PATCH 132/191] fix build error --- src/components/views/landings/refi/ReFiHeader.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/views/landings/refi/ReFiHeader.tsx b/src/components/views/landings/refi/ReFiHeader.tsx index 227d81c1a6..c7f9febc34 100644 --- a/src/components/views/landings/refi/ReFiHeader.tsx +++ b/src/components/views/landings/refi/ReFiHeader.tsx @@ -1,9 +1,5 @@ import styled from 'styled-components'; -import { H1 } from '@giveth/ui-design-system'; -import { - brandColors, - neutralColors, -} from '@giveth/ui-design-system/lib/esm/common/colors'; +import { H1, brandColors, neutralColors } from '@giveth/ui-design-system'; import Wave from '@/components/particles/Wave'; import { mediaQueries } from '@/lib/constants/constants'; From 54380437a5154d3adbbde10266f9cd6c70d0e239 Mon Sep 17 00:00:00 2001 From: Ramin Date: Wed, 26 Jul 2023 00:24:23 +0330 Subject: [PATCH 133/191] update divider component --- src/components/Divider.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/Divider.tsx b/src/components/Divider.tsx index 147a0f6339..3e3cb81306 100644 --- a/src/components/Divider.tsx +++ b/src/components/Divider.tsx @@ -1,13 +1,13 @@ import styled from 'styled-components'; import { neutralColors } from '@giveth/ui-design-system'; -const Divider = ({ color }: { color?: string }) => { - return ; +const Divider = ({ color, height }: { color?: string; height?: string }) => { + return ; }; -const Line = styled.div<{ color?: string }>` +const Separator = styled.div<{ color?: string; height?: string }>` width: 100%; - height: 1px; + height: ${props => props.height || '1px'}; background-color: ${props => props.color || neutralColors.gray['400']}; `; From 7a5463b8c805fd77cb7216fbde2a23aaf4ec7eb6 Mon Sep 17 00:00:00 2001 From: Ramin Date: Wed, 26 Jul 2023 00:24:41 +0330 Subject: [PATCH 134/191] remove body component --- .../views/landings/refi/body/index.tsx | 247 ------------------ 1 file changed, 247 deletions(-) delete mode 100644 src/components/views/landings/refi/body/index.tsx diff --git a/src/components/views/landings/refi/body/index.tsx b/src/components/views/landings/refi/body/index.tsx deleted file mode 100644 index ef77e851f1..0000000000 --- a/src/components/views/landings/refi/body/index.tsx +++ /dev/null @@ -1,247 +0,0 @@ -import { - Button, - H3, - H4, - IconDiscord, - IconInstagram, - IconLinkedin, - IconTwitter, - IconYoutube, - Lead, -} from '@giveth/ui-design-system'; -import styled from 'styled-components'; -import KeyAspectsSVG from '@/components/views/landings/refi/body/KeyAspectsSVG'; -import ExternalLink from '@/components/ExternalLink'; -import links from '@/lib/constants/links'; -import { Flex, FlexCenter } from '@/components/styled-components/Flex'; -import Routes from '@/lib/constants/Routes'; - -const ReFiBody = () => { - return ( - - - Giveth, the revolutionary crypto fundraising platform, embodies - ReFi by leveraging blockchain technology to empower changemakers - to contribute to a more equitable and sustainable financial - system. -
-
- First of all, what is ReFi? -
-
- Regenerative Finance, or ReFi, is a movement that recognizes the - potential of blockchain, or crypto technology, and web3 to drive - positive change in addressing climate change, supporting - conservation efforts, promoting biodiversity and more. It aims - to leverage the transformative capabilities of decentralized - technologies to foster regenerative practices in the financial - sector. - - - Key aspects of regenerative finance (ReFi) - - - - Climate Change Mitigation - - ReFi seeks to utilize blockchain to develop innovative - financial solutions that support climate change mitigation - efforts. This can involve facilitating investments in - renewable energy projects, carbon offset initiatives, and - sustainable infrastructure development. - - Conservation and Biodiversity - - ReFi recognizes the importance of protecting and preserving - natural ecosystems and biodiversity. ReFi promotes - transparent and traceable supply chains, facilitates - investments in conservation projects, and enables the - trading of nature-based assets such as carbon credits or - ecosystem services. - - Equity and Inclusion - - A core principle of ReFi is to build a financial system that - is inclusive, accessible, and equitable for all. By - leveraging blockchain's decentralized structure, ReFi aims - to eliminate barriers and provide financial services to - underserved populations, promoting economic empowerment and - reducing inequalities. - - Sustainable Investments - - ReFi emphasizes the importance of sustainable investments - that generate positive environmental and social impacts. - Through blockchain-based platforms and decentralized finance - (DeFi) mechanisms, ReFi enables individuals and - organizations to participate in impact investing, fund - projects aligned with sustainability goals, and support - regenerative practices. - - - Transparency and Accountability - - - Blockchain's inherent transparency and immutability are - leveraged in ReFi to enhance financial accountability and - reduce the risk of fraud or corruption. Smart contracts and - decentralized governance models are used to ensure - transparency in financial transactions, investment - processes, and project outcomes. - - ReFi versus DeFi - - ReFi in the web3, crypto world is also a play on, or - response to, “DeFi” (decentralized finance). While users of - DeFi in the crypto world typically focus just on making - money at all costs, ReFi users instead look at how financial - decisions impact the environment and planet, thereby leading - to a holistic approach to finance that favors sustainability - and, naturally, regeneration. - - - - ReFi represents a growing movement where technology is seen as a - powerful tool to address urgent global challenges while - fostering an evolved financial ecosystem. -
-
- Giveth strengthens the ReFi movement by providing a platform - that empowers individuals to support regenerative finance - initiatives, through its innovative approach to fundraising and - commitment to fostering positive change. With ReFi at its heart, - Giveth is driving the transformation of the financial sector - towards a more equitable, sustainable, and regenerative future. - - - - Fundraising for Regenerative Initiatives - - - Giveth's platform enables individuals, nonprofits, and - social enterprises to raise funds specifically for - regenerative projects. Through Giveth, these projects gain - access to a global network of donors who are passionate - about supporting initiatives related to climate change - mitigation, conservation, biodiversity, and other - sustainable efforts. - - - Transparent and Accountable Giving - - - Giveth utilizes blockchain's transparency and immutability - to ensure that every donation is traceable and accounted - for. This fosters trust and confidence among donors, as they - can see how their contributions are being utilized and the - impact they are making in the ReFi ecosystem. - - Engaging the Community - - Giveth actively cultivates a community-driven approach by - encouraging collaboration and participation from its users - by rewarding them with governance tokens. By connecting - individuals and organizations through its platform, Giveth - facilitates the sharing of ideas, resources, and expertise, - amplifying the collective impact of the ReFi movement. - - Working with ReFi Partners - - At Giveth, we work with several projects in the ReFi space. - Most notably, we are integrated with the Ethereum, Optimism - and Celo blockchains. Users can donate to any of Giveth - projects on any of those chains and using over 30 tokens. - One of Celo’s missions, for example, is to make their - protocol an engine that drives the future of regenerative - economics. Other notable projects that are raising funds on - Giveth in the ReFi space are ReFi Spring and ReFi DAO. - - Regenerative Economies - - Giveth’s long term goal is to put the for-good projects from - its platform on the path to becoming their own regenerative - economies. ReFi at the core, they will become circular or - “micro” economies, where their project-specific tokens - circulate and have market demand, and investors can engage - competitively in supporting the regenerative goals of the - projects. - - - Supporting Sustainability and Regeneration - - - Giveth's platform provides an avenue for individuals to - engage in real impact by supporting regenerative projects - aligned with ReFi's goals. By leveraging blockchain-based - mechanisms, Giveth enables transparent and efficient - investment processes that direct capital towards sustainable - initiatives, contributing to the growth and development of - the ReFi ecosystem. - - - - - - - - Join our community - - - - - - - - - - - - - - - - - -
- ); -}; - -const ButtonWrapper = styled(FlexCenter)` - margin: 80px 0; -`; - -const IconContainer = styled(Flex)` - align-items: center; - gap: 40px; -`; - -const Body = styled(Lead)` - margin-bottom: 80px; -`; - -const AspectsWrapper = styled.div` - margin-left: 50px; -`; - -const Wrapper = styled.div` - max-width: 1280px; - margin: 80px auto; - padding: 0 40px; -`; - -const H3Styled = styled(H3)` - margin-bottom: 20px; -`; - -const H4Styled = styled(H4)` - margin-bottom: 15px; -`; - -const LeadStyled = styled(Lead)` - margin-bottom: 40px; -`; - -export default ReFiBody; From ad4ec4eec0ced68ab2f2a8f5bcacc73d6f0a84c2 Mon Sep 17 00:00:00 2001 From: Ramin Date: Wed, 26 Jul 2023 00:25:11 +0330 Subject: [PATCH 135/191] remove separator component --- src/components/views/landings/refi/index.tsx | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/components/views/landings/refi/index.tsx b/src/components/views/landings/refi/index.tsx index 7176be45aa..bf106dd8e2 100644 --- a/src/components/views/landings/refi/index.tsx +++ b/src/components/views/landings/refi/index.tsx @@ -4,29 +4,27 @@ import GetUpdates from '@/components/GetUpdates'; import JoinUsOnDiscord from '@/components/JoinUsOnDiscord'; import QuoteSection from '@/components/views/landings/refi/QuoteSection'; import ReFiHeader from '@/components/views/landings/refi/ReFiHeader'; -import ReFiBody from '@/components/views/landings/refi/body'; +import Divider from '@/components/Divider'; +import GivethTheRevolutionary from '@/components/views/landings/refi/GivethTheRevolutionary'; +import FirstOfAll from '@/components/views/landings/refi/FirstOfAll'; const ReFiLandingPage = () => { return ( - - + + + + - + - + ); }; -const Separator = styled.div` - background: ${neutralColors.gray[200]}; - width: 100%; - height: 40px; -`; - const Wrapper = styled.div` width: 100%; background: white; From 8710f722926727e9a5cf850d6f5d479a03f6fb86 Mon Sep 17 00:00:00 2001 From: Ramin Date: Wed, 26 Jul 2023 00:25:26 +0330 Subject: [PATCH 136/191] move aspects svg --- src/components/views/landings/refi/{body => }/KeyAspectsSVG.tsx | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/components/views/landings/refi/{body => }/KeyAspectsSVG.tsx (100%) diff --git a/src/components/views/landings/refi/body/KeyAspectsSVG.tsx b/src/components/views/landings/refi/KeyAspectsSVG.tsx similarity index 100% rename from src/components/views/landings/refi/body/KeyAspectsSVG.tsx rename to src/components/views/landings/refi/KeyAspectsSVG.tsx From 9f2743079811e28aa85144112c86e1a0d4debd39 Mon Sep 17 00:00:00 2001 From: Ramin Date: Wed, 26 Jul 2023 00:25:53 +0330 Subject: [PATCH 137/191] develop Giveth the revolutionary section --- .../landings/refi/GivethTheRevolutionary.tsx | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/components/views/landings/refi/GivethTheRevolutionary.tsx diff --git a/src/components/views/landings/refi/GivethTheRevolutionary.tsx b/src/components/views/landings/refi/GivethTheRevolutionary.tsx new file mode 100644 index 0000000000..6522f53e19 --- /dev/null +++ b/src/components/views/landings/refi/GivethTheRevolutionary.tsx @@ -0,0 +1,25 @@ +import styled from 'styled-components'; +import { H4, neutralColors } from '@giveth/ui-design-system'; + +const GivethTheRevolutionary = () => { + return ( + +

+ Giveth, the revolutionary crypto fundraising platform, + embodies + ReFi by leveraging blockchain technology to empower + changemakers to contribute to a more equitable and sustainable + financial system. +

+
+ ); +}; + +const Wrapper = styled.div` + max-width: 1180px; + padding: 120px 30px 80px; + margin: 0 auto; + color: ${neutralColors.gray[900]}}; +`; + +export default GivethTheRevolutionary; From d62fcb77ffd20dfcf444dd35a8e8f28dc183bef3 Mon Sep 17 00:00:00 2001 From: Ramin Date: Wed, 26 Jul 2023 00:55:15 +0330 Subject: [PATCH 138/191] update svg file --- src/components/views/landings/refi/KeyAspectsSVG.tsx | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/views/landings/refi/KeyAspectsSVG.tsx b/src/components/views/landings/refi/KeyAspectsSVG.tsx index 3e1fd7a786..d0b55811a1 100644 --- a/src/components/views/landings/refi/KeyAspectsSVG.tsx +++ b/src/components/views/landings/refi/KeyAspectsSVG.tsx @@ -1,6 +1,6 @@ import React from 'react'; import styled from 'styled-components'; -import { FlexCenter } from '@/components/styled-components/Flex'; +import { mediaQueries } from '@/lib/constants/constants'; const KeyAspectsSVG = () => ( @@ -178,8 +178,14 @@ const KeyAspectsSVG = () => ( ); -const Wrapper = styled(FlexCenter)` - margin-bottom: 80px; +const Wrapper = styled.div` + width: 325px; + height: 242px; + flex-shrink: 0; + margin: 0 auto; + ${mediaQueries.tablet} { + margin-top: 40px; + } `; export default KeyAspectsSVG; From 2bf51207cf6d46783b28c7ad4195008ac74d05a1 Mon Sep 17 00:00:00 2001 From: Ramin Date: Wed, 26 Jul 2023 00:55:38 +0330 Subject: [PATCH 139/191] develop First of all --- .../views/landings/refi/FirstOfAll.tsx | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/components/views/landings/refi/FirstOfAll.tsx diff --git a/src/components/views/landings/refi/FirstOfAll.tsx b/src/components/views/landings/refi/FirstOfAll.tsx new file mode 100644 index 0000000000..332d70631e --- /dev/null +++ b/src/components/views/landings/refi/FirstOfAll.tsx @@ -0,0 +1,31 @@ +import styled from 'styled-components'; +import { H4, neutralColors } from '@giveth/ui-design-system'; + +const GivethTheRevolutionary = () => { + return ( + +

First of all, what is ReFi?

+

+ Regenerative Finance, or ReFi, is a movement that recognizes the + potential of blockchain, or crypto technology, and web3 to drive + positive change in addressing climate change, supporting + conservation efforts, promoting biodiversity and more. It aims + to leverage the transformative capabilities of decentralized + technologies to foster regenerative practices in the financial + sector. +

+
+ ); +}; + +const Wrapper = styled.div` + max-width: 1180px; + padding: 120px 30px 120px; + margin: 0 auto; + color: ${neutralColors.gray[900]}}; + > *:first-child { + margin-bottom: 16px; + } +`; + +export default GivethTheRevolutionary; From 0ead67bdfd43b15b06ea17b1b17b32b923e80d30 Mon Sep 17 00:00:00 2001 From: Ramin Date: Wed, 26 Jul 2023 00:55:56 +0330 Subject: [PATCH 140/191] fix eslint --- src/components/views/landings/refi/GivethTheRevolutionary.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/landings/refi/GivethTheRevolutionary.tsx b/src/components/views/landings/refi/GivethTheRevolutionary.tsx index 6522f53e19..15eb87adfd 100644 --- a/src/components/views/landings/refi/GivethTheRevolutionary.tsx +++ b/src/components/views/landings/refi/GivethTheRevolutionary.tsx @@ -19,7 +19,7 @@ const Wrapper = styled.div` max-width: 1180px; padding: 120px 30px 80px; margin: 0 auto; - color: ${neutralColors.gray[900]}}; + color: ${neutralColors.gray[900]}}; `; export default GivethTheRevolutionary; From dbe50bd2a79f5e0a6ca6e4afec25fa8d91b66fe2 Mon Sep 17 00:00:00 2001 From: Ramin Date: Wed, 26 Jul 2023 00:56:11 +0330 Subject: [PATCH 141/191] add KeyAspects --- src/components/views/landings/refi/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/views/landings/refi/index.tsx b/src/components/views/landings/refi/index.tsx index bf106dd8e2..186e70bd1d 100644 --- a/src/components/views/landings/refi/index.tsx +++ b/src/components/views/landings/refi/index.tsx @@ -7,6 +7,7 @@ import ReFiHeader from '@/components/views/landings/refi/ReFiHeader'; import Divider from '@/components/Divider'; import GivethTheRevolutionary from '@/components/views/landings/refi/GivethTheRevolutionary'; import FirstOfAll from '@/components/views/landings/refi/FirstOfAll'; +import KeyAspects from '@/components/views/landings/refi/KeyAspects'; const ReFiLandingPage = () => { return ( @@ -16,6 +17,8 @@ const ReFiLandingPage = () => { + + From 3cba4833f4c4ca107c23742eb98842d80b87f8a8 Mon Sep 17 00:00:00 2001 From: Ramin Date: Wed, 26 Jul 2023 00:56:57 +0330 Subject: [PATCH 142/191] develop Key aspects of regenerative finance (ReFi) --- .../views/landings/refi/KeyAspects.tsx | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 src/components/views/landings/refi/KeyAspects.tsx diff --git a/src/components/views/landings/refi/KeyAspects.tsx b/src/components/views/landings/refi/KeyAspects.tsx new file mode 100644 index 0000000000..9ae83d8597 --- /dev/null +++ b/src/components/views/landings/refi/KeyAspects.tsx @@ -0,0 +1,49 @@ +import styled from 'styled-components'; +import { H3, neutralColors, Lead } from '@giveth/ui-design-system'; +import { Flex } from '@/components/styled-components/Flex'; +import KeyAspectsSVG from '@/components/views/landings/refi/KeyAspectsSVG'; +import { mediaQueries } from '@/lib/constants/constants'; + +const KeyAspects = () => { + return ( + + +
+ + Key aspects of regenerative finance (ReFi) + +
+ Although it has a clear mission of using financial + incentives for the betterment of the planet, + Regenerative Finance (ReFi) is a complex topic with many + different aspects to consider. Below are some of the + ways in which ReFi is changing the way that we design + crypto systems on the social layer for web3. +
+
+ +
+
+ ); +}; + +const FlexStyled = styled(Flex)` + padding: 40px 0; + flex-direction: column; + ${mediaQueries.tablet} { + flex-direction: row; + } +`; + +const H3Styled = styled(H3)` + margin-bottom: 31px; +`; + +const Wrapper = styled(Lead)` + max-width: 1180px; + padding: 40px 30px; + margin: 0 auto; + color: ${neutralColors.gray[900]}}; +`; + +export default KeyAspects; From dcfdd2a35c4c0d2061979e428a0aaa4a414d14ea Mon Sep 17 00:00:00 2001 From: Ramin Date: Wed, 26 Jul 2023 01:16:30 +0330 Subject: [PATCH 143/191] add TextCenter style --- src/components/styled-components/Text.ts | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 src/components/styled-components/Text.ts diff --git a/src/components/styled-components/Text.ts b/src/components/styled-components/Text.ts new file mode 100644 index 0000000000..0685927864 --- /dev/null +++ b/src/components/styled-components/Text.ts @@ -0,0 +1,5 @@ +import styled from 'styled-components'; + +export const TextCenter = styled.div` + text-align: center; +`; From b53f6f7407dfed45e0986ad601b7baa75d87ac99 Mon Sep 17 00:00:00 2001 From: Ramin Date: Wed, 26 Jul 2023 01:16:48 +0330 Subject: [PATCH 144/191] add ReFiProjects route --- src/lib/constants/Routes.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/constants/Routes.ts b/src/lib/constants/Routes.ts index a65fc0a5a6..b9b5e883b1 100644 --- a/src/lib/constants/Routes.ts +++ b/src/lib/constants/Routes.ts @@ -22,6 +22,7 @@ const Routes = { Projects: '/projects', QFProjects: '/qf', Project: '/project', + ReFiProjects: '/projects/finance', Donate: `/donate`, User: `/user`, AboutUs: '/about', From 5581fd35467bf367ac7694e15fda49a70c03282c Mon Sep 17 00:00:00 2001 From: Ramin Date: Wed, 26 Jul 2023 01:17:12 +0330 Subject: [PATCH 145/191] add aspects --- .../views/landings/refi/KeyAspects.tsx | 59 ++++++++++++++++++- 1 file changed, 58 insertions(+), 1 deletion(-) diff --git a/src/components/views/landings/refi/KeyAspects.tsx b/src/components/views/landings/refi/KeyAspects.tsx index 9ae83d8597..4335bc2b58 100644 --- a/src/components/views/landings/refi/KeyAspects.tsx +++ b/src/components/views/landings/refi/KeyAspects.tsx @@ -1,8 +1,12 @@ import styled from 'styled-components'; -import { H3, neutralColors, Lead } from '@giveth/ui-design-system'; +import { H3, H4, neutralColors, Lead, Button } from '@giveth/ui-design-system'; import { Flex } from '@/components/styled-components/Flex'; import KeyAspectsSVG from '@/components/views/landings/refi/KeyAspectsSVG'; import { mediaQueries } from '@/lib/constants/constants'; +import Divider from '@/components/Divider'; +import ExternalLink from '@/components/ExternalLink'; +import Routes from '@/lib/constants/Routes'; +import { TextCenter } from '@/components/styled-components/Text'; const KeyAspects = () => { return ( @@ -23,10 +27,63 @@ const KeyAspects = () => { + + {aspects.map(aspect => ( + +

{aspect.title}

+
{aspect.description}
+
+ ))} + + + +