Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decentralized Verification: Moving from verified to vouches #4729

Merged
merged 4 commits into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lang/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -1108,6 +1108,8 @@
"label.verification_rejected": "Verificació rebutjada",
"label.verification_status": "Estat de verificació",
"label.verified": "Verificat",
"label.vouched": "Avalat",
"label.isGivbackEligible": "Apte per a Givbacks",
"label.verified_projects": "Projectes verificats",
"label.verified_status_for": "Elegibilitat per a GIVbacks per a",
"label.verify_email_address": "Verificar correu electrònic",
Expand Down Expand Up @@ -1302,7 +1304,7 @@
"label.passport_connected": "Passaport connectat",
"label.increase_passport_score": "Augmenta la puntuació del passaport",
"label.project_owner_address_detected": "Adreça del propietari del projecte detectada",
"label.project_owner_cant_donate_to_own_project": "No pots donar a un projecte del qual ets propietari. Hi ha milers de projectes a Giveth que busquen el teu suport! Si us plau, tria un altre projecte per donar.",
"label.project_owner_cant_donate_to_own_project": "No pots donar a un projecte del qual ets propietari. Hi ha milers de projectes a Giveth que busquen el teu suport! Si us plau, tria un altre projecte per donar.",
"label.qf_donor_eligibility.banner.check_eligibility": "Fes que les teves donacions es igualin! Verifica la teva unicitat amb un clic.",
"label.qf_donor_eligibility.banner.recheck_eligibility": "Fes que les teves donacions es igualin! Augmenta la teva puntuació de Gitcoin Passport abans de",
"label.qf_donor_eligibility.banner.more_info_needed": "Necessitem una mica més d'informació per verificar la teva elegibilitat per QF!",
Expand Down Expand Up @@ -1627,7 +1629,9 @@
"project.givback_toast.description.non_verified_public": "Actualment, els GIVbacks només s'atorguen per donacions fetes a projectes elegibles per a GIVbacks a Ethereum. La teva contribució segueix sent important, fins i tot si no genera GIVbacks!",
"project.givback_toast.description.verified_owner": "Impulsa el teu projecte per augmentar la quantitat de GIVbacks que reben els teus donants a Ethereum i augmentar la seva visibilitat entre altres projectes.",
"project.givback_toast.description.verified_owner.note": "Com a propietari d'aquest projecte, no rebràs GIVbacks per donar-hi.",
"project.givback_toast.description.verified_public": "Les donacions a Ethereum a projectes elegibles per a GIVbacks són recompensades amb GIV. Impulsa aquest projecte per augmentar el seu percentatge de recompenses i fer-lo més visible a la pàgina de projectes!", "project.givback_toast.title.non_verified_owner": "El teu projecte està creant o donant suport a béns públics?",
"project.givback_toast.description.verified_public": "Les donacions a Ethereum a projectes elegibles per a GIVbacks són recompensades amb GIV. Impulsa aquest projecte per augmentar el seu percentatge de recompenses i fer-lo més visible a la pàgina de projectes!",
"project.givback_toast.title.non_verified_owner": "El teu projecte està creant o donant suport a béns públics?",
"project.givback_toast.description.verified_public_not_eligible": "Bloqueja i assegura els teus tokens GIV per obtenir GIVpower. Impulsa aquest projecte per fer-lo més visible a la pàgina de projectes! Tingues en compte que, tot i que aquest projecte és elegible per ser impulsat amb GIVpower, no generarà GIVbacks per als seus donants.",
"project.givback_toast.title.non_verified_owner_cancelled": "Estat Cancel·lat",
"project.givback_toast.title.non_verified_owner_deactive": "Mode Desactivat",
"project.givback_toast.title.non_verified_owner_draft": "Publica el teu projecte avui!",
Expand All @@ -1639,6 +1643,7 @@
"project.givback_toast.title.verified_owner_2": " del valor de la donació!",
"project.givback_toast.title.verified_public_1": "Rep recompenses de fins a ",
"project.givback_toast.title.verified_public_2": " del valor de la teva donació!",
"project.givback_toast.title.verified_public_not_eligible": "Impulsa aquest projecte amb GIVpower!",
"projects_all": "Tots els Projectes",
"projects_all_desc": "SUPORT A PROJECTES GLOBALS DE BÉS PÚBLICS, SOSTENIBILITAT I REGENERACIÓ AMB CRYPTODONACIONS",
"projects_art-and-culture": "Art i Cultura",
Expand Down
8 changes: 6 additions & 2 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -1109,8 +1109,10 @@
"label.verification_process": "GIVbacks Eligibility process",
"label.verification_rejected": "Verification Rejected",
"label.verification_status": "GIVbacks Eligibility status",
"label.verified": "GIVbacks Eligible",
"label.verified_projects": "GIVbacks eligible projects",
"label.verified": "Verified",
"label.vouched": "Vouched",
"label.isGivbackEligible": "Givbacks Eligible",
"label.verified_projects": "Verified projects",
"label.verified_status_for": "GIVbacks Eligibility for",
"label.verify_email_address": "Verify email address",
"label.verify_your_project": "GIVbacks Eligibility Form",
Expand Down Expand Up @@ -1633,6 +1635,7 @@
"project.givback_toast.description.verified_owner": "Boost your project to increase the amount of GIVbacks your donors on Ethereum receive and increase its visibility among other projects!",
"project.givback_toast.description.verified_owner.note": "As the owner of this project, you won’t get GIVbacks for donating to it.",
"project.givback_toast.description.verified_public": "Ethereum donations to GIVbacks Eligible projects are rewarded with GIV. Boost this project to increase its rewards percentage and make it more visible on the projects page!",
"project.givback_toast.description.verified_public_not_eligible": "Stake and lock your GIV tokens to get GIVpower. Boost this project make it more visible on the projects page! Note that while this project is eligible to be boosted with GIVpower, it will not yield GIVbacks to it's donors.",
"project.givback_toast.title.non_verified_owner": "Is your project creating or supporting public goods?",
"project.givback_toast.title.non_verified_owner_cancelled": "Project Cancelled",
"project.givback_toast.title.non_verified_owner_deactive": "Project Deactivated",
Expand All @@ -1641,6 +1644,7 @@
"project.givback_toast.title.non_verified_owner_rejected": "We couldn't approve your project as GIVbacks eligible",
"project.givback_toast.title.non_verified_owner_submitted": "Application submitted",
"project.givback_toast.title.non_verified_public": "Why no GIVbacks?",
"project.givback_toast.title.verified_public_not_eligible": "Boost this project with GIVpower!",
"project.givback_toast.title.verified_owner_1": "Donors get rewarded with up to ",
"project.givback_toast.title.verified_owner_2": " of the donation value!",
"project.givback_toast.title.verified_public_1": "Get rewarded with up to ",
Expand Down
4 changes: 4 additions & 0 deletions lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,8 @@
"label.verification_rejected": "Verificación rechazada",
"label.verification_status": "Estado de verificación",
"label.verified": "Verificado",
"label.vouched": "Avalado",
"label.isGivbackEligible": "Elegible para GIVbacks",
"label.verified_projects": "Proyectos verificados",
"label.verified_status_for": "Elegibilidad para GIVbacks para",
"label.verify_email_address": "Verificar email",
Expand Down Expand Up @@ -1628,6 +1630,7 @@
"project.givback_toast.description.verified_owner": "Impulsa tu proyecto para aumentar la cantidad de GIVbacks que reciben tus donantes en Ethereum y aumentar su visibilidad entre otros proyectos.",
"project.givback_toast.description.verified_owner.note": "Como propietario de este proyecto, no recibirás GIVbacks por donar a él.",
"project.givback_toast.description.verified_public": "Las donaciones en Ethereum a proyectos elegibles para GIVbacks son recompensadas con GIV. ¡Impulsa este proyecto para aumentar su porcentaje de recompensas y hacerlo más visible en la página de proyectos!",
"project.givback_toast.description.verified_public_not_eligible": "Haz stake y bloquea tus GIV tokens para obtener GIVpower. ¡Impulsa este proyecto para hacerlo más visible en la página de proyectos! Ten en cuenta que aunque este proyecto es elegible para ser impulsado con GIVpower, no generará GIVbacks para sus donantes.",
"project.givback_toast.title.non_verified_owner": "¿Tu proyecto está creando o apoyando bienes públicos?",
"project.givback_toast.title.non_verified_owner_cancelled": "Estado Cancelado",
"project.givback_toast.title.non_verified_owner_deactive": "Modo Desactivado",
Expand All @@ -1636,6 +1639,7 @@
"project.givback_toast.title.non_verified_owner_rejected": "No pudimos verificar tu proyecto como un bien público",
"project.givback_toast.title.non_verified_owner_submitted": "Solicitud enviada",
"project.givback_toast.title.non_verified_public": "¿Por qué no GIVbacks?",
"project.givback_toast.title.verified_public_not_eligible": "Boostea este proyecto con GIVpower!",
"project.givback_toast.title.verified_owner_1": "Los donantes reciben recompensas de hasta ",
"project.givback_toast.title.verified_owner_2": " del valor de la donación.",
"project.givback_toast.title.verified_public_1": "¡Recibe recompensas de hasta ",
Expand Down
4 changes: 4 additions & 0 deletions src/apollo/gql/gqlProjects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export const PROJECT_CORE_FIELDS = gql`
image
slug
verified
isGivbackEligible
totalDonations
qfRounds {
id
Expand Down Expand Up @@ -142,6 +143,7 @@ export const FETCH_PROJECT_BY_SLUG_DONATION = gql`
slug
descriptionSummary
verified
isGivbackEligible
totalDonations
sumDonationValueUsdForActiveQfRound
countUniqueDonorsForActiveQfRound
Expand Down Expand Up @@ -211,6 +213,7 @@ export const FETCH_PROJECT_BY_SLUG_SINGLE_PROJECT = gql`
image
slug
verified
isGivbackEligible
totalDonations
description
addresses {
Expand Down Expand Up @@ -595,6 +598,7 @@ export const ADD_RECIPIENT_ADDRESS_TO_PROJECT = gql`
listed
reviewStatus
verified
isGivbackEligible
slugHistory
creationDate
adminUserId
Expand Down
1 change: 1 addition & 0 deletions src/apollo/types/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export interface IProject {
impactLocation?: string;
qualityScore?: number;
verified?: boolean;
isGivbackEligible?: boolean;
verificationStatus?: EProjectVerificationStatus;
listed?: boolean | null;
categories: ICategory[];
Expand Down
2 changes: 1 addition & 1 deletion src/components/DonateSocialBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ interface ISocialBox {
const DonateSocialBox: FC<ISocialBox> = props => {
const [showModal, setShowModal] = useState<boolean>(false);
const { project, isDonateFooter } = props;
const { slug, verified } = project;
const { slug } = project;
const { isMobile } = useDetectDevice();
const { formatMessage } = useIntl();
const { isActive } = useProjectContext();
Expand Down
36 changes: 36 additions & 0 deletions src/components/badges/GivBackBadge.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import {
Overline,
FlexCenter,
brandColors,
IconGIVBack,
} from '@giveth/ui-design-system';
import styled from 'styled-components';
import { useIntl } from 'react-intl';

export const GivBackBadge = () => {
const { formatMessage } = useIntl();
return (
<Wrapper>
<IconGIVBack color='white' />
<TextBadge $styleType='Small'>
{formatMessage({ id: 'label.isGivbackEligible' })}
</TextBadge>
</Wrapper>
);
};

const Wrapper = styled(FlexCenter)`
height: 30px;
background: ${brandColors.giv[500]};
border-radius: 56px;
color: white;
padding: 2px 12px 0 10px;
justify-content: center;
margin-right: 8px;
`;

const TextBadge = styled(Overline)`
padding-left: 0.5rem;
margin-right: 5px;
text-transform: uppercase;
`;
2 changes: 1 addition & 1 deletion src/components/badges/VerifiedBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const VerifiedBadge = () => {
<Wrapper>
<IconVerifiedBadge />
<TextBadge $styleType='Small'>
{formatMessage({ id: 'label.verified' })}
{formatMessage({ id: 'label.vouched' })}
</TextBadge>
</Wrapper>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/menu/FilterMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ interface IFilterMenuProps {

const projectsFeatures = [
{
label: { id: 'label.verified' },
label: { id: 'label.vouched' },
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

Inconsistent terminology change from "verified" to "vouched".

The terminology change from "verified" to "vouched" has not been consistently applied across the codebase. There are still numerous instances of "verified" in both TypeScript/JavaScript files and localization files. Please review the codebase to ensure that the terminology change is consistently applied to maintain a cohesive user experience.

  • TypeScript/JavaScript files: Multiple occurrences of "verified" remain.
  • Localization files: Numerous instances of "verified" are still present.
Analysis chain

Verify the consistency of the terminology change.

The change from "verified" to "vouched" aligns with the PR objective. However, please ensure that this terminology change is consistently applied across the codebase and user interface to maintain a cohesive user experience.

Run the following script to verify the consistency of the terminology change:

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the consistency of the terminology change from "verified" to "vouched".

# Test 1: Search for the "verified" term usage in TypeScript/JavaScript files.
# Expect: Only occurrences related to the `EProjectsFilter.VERIFIED` enum value.
rg --type-add 'ts:*.ts,*.tsx' --type ts verified

# Test 2: Search for the "vouched" term usage in TypeScript/JavaScript files.
# Expect: Only occurrences related to the UI labels.
rg --type-add 'ts:*.ts,*.tsx' --type ts vouched

# Test 3: Search for the "verified" term usage in the localization files.
# Expect: No occurrences.
rg --type-add 'i18n:*.json' --type i18n verified

# Test 4: Search for the "vouched" term usage in the localization files.
# Expect: Only occurrences related to the UI labels.
rg --type-add 'i18n:*.json' --type i18n vouched

Length of output: 47611

value: EProjectsFilter.VERIFIED,
},
];
Expand Down
20 changes: 19 additions & 1 deletion src/components/project-card/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
H5,
Flex,
IconHelpFilled16,
IconGIVBack16,
} from '@giveth/ui-design-system';
import Link from 'next/link';
import { useIntl } from 'react-intl';
Expand Down Expand Up @@ -61,6 +62,7 @@ interface IRecurringDonation {
}
const ProjectCard = (props: IProjectCard) => {
const { project, className } = props;

const {
id,
title,
Expand All @@ -72,6 +74,7 @@ const ProjectCard = (props: IProjectCard) => {
sumDonationValueUsdForActiveQfRound,
organization,
verified,
isGivbackEligible,
latestUpdateCreationDate,
countUniqueDonors,
qfRounds,
Expand Down Expand Up @@ -338,14 +341,24 @@ const ProjectCard = (props: IProjectCard) => {
<Hr />
<PaddedRow $justifyContent='space-between'>
<Flex gap='16px'>
{isGivbackEligible && (
<Flex $alignItems='center' gap='4px'>
<IconGIVBack16
color={brandColors.giv[500]}
/>
<GivbackEligibleText>
GIVbacks
</GivbackEligibleText>
</Flex>
)}
{verified && (
<Flex $alignItems='center' gap='4px'>
<IconVerifiedBadge16
color={semanticColors.jade[500]}
/>
<VerifiedText>
{formatMessage({
id: 'label.verified',
id: 'label.vouched',
})}
</VerifiedText>
</Flex>
Expand Down Expand Up @@ -424,6 +437,11 @@ const VerifiedText = styled(Subline)`
color: ${semanticColors.jade[500]};
`;

const GivbackEligibleText = styled(Subline)`
text-transform: uppercase;
color: ${brandColors.giv[500]};
`;

const LastUpdatedContainer = styled(Subline)<{ $isHover?: boolean }>`
position: absolute;
bottom: 30px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/donate/DonateIndex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const DonateIndex: FC = () => {
],
givBackEligible:
isTokenEligibleForGivback &&
project.verified &&
project.isGivbackEligible &&
isSignedIn &&
isEnabled,
chainId: config.STELLAR_NETWORK_NUMBER,
Expand Down
6 changes: 6 additions & 0 deletions src/components/views/donate/DonatePageProjectDescription.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import { slugToProjectView } from '@/lib/routeCreators';
import { ProjectCardUserName } from '@/components/project-card/ProjectCardUserName';
import { ORGANIZATION } from '@/lib/constants/organizations';
import { useDonateData } from '@/context/donate.context';
import { GivBackBadge } from '@/components/badges/GivBackBadge';

interface IDonatePageProjectDescriptionProps {
projectData?: IProject;
Expand Down Expand Up @@ -48,6 +49,11 @@ export const DonatePageProjectDescription: FC<

return (
<DonationSectionWrapper gap='16px'>
{projectData?.isGivbackEligible && (
<Flex>
<GivBackBadge />
</Flex>
)}
{projectData?.verified && (
<Flex>
<VerifiedBadge />
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/donate/OnTime/OneTimeDonationCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const CryptoDonation: FC<{
const dispatch = useAppDispatch();

const {
verified,
isGivbackEligible,
Copy link
Contributor

Choose a reason for hiding this comment

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

Tip

Codebase Verification

Inconsistent renaming of verified to isGivbackEligible.

The renaming of verified to isGivbackEligible has not been consistently applied throughout the codebase. The term verified is still present in many files, which could lead to confusion or errors. Please review and update all relevant instances to ensure consistency.

  • Files with remaining occurrences of verified:
    • src/content/metatags.ts
    • src/content/FAQ.tsx
    • src/lib/constants/shareContent.ts
    • src/apollo/gql/gqlPowerBoosting.ts
    • src/components/project-card/ProjectCard.tsx
    • src/components/views/userProfile/projectsTab/ProjectActions.tsx
    • src/components/views/userProfile/projectsTab/ProjectItem.tsx
    • src/components/views/verification/SocialProfile.tsx
    • src/components/views/verification/VerificationStatusReport.tsx
    • src/components/views/verification/menu/MobileMenu.tsx
    • src/components/views/verification/EmailVerificationIndex.tsx
    • src/components/views/verification/menu/DesktopMenu.tsx
    • src/components/views/verification/Done.tsx
    • src/components/views/userProfile/ProfileOverviewTab.tsx
    • src/components/views/userProfile/boostedTab/BoostsTable.tsx
    • src/components/views/claim/cards/Donate.tsx
    • src/components/views/claim/cards/Connect.tsx
    • src/components/views/project/ProjectTabs.tsx
    • src/components/views/project/ProjectBadges.tsx
    • src/components/views/project/ProjectGIVbackToast.tsx
    • src/components/views/project/projectActionCard/AdminActions.tsx
    • src/components/views/project/projectActionCard/ProjectStats.tsx
    • src/components/modals/StakeLock/LockInfo.tsx
    • src/components/modals/StakeLock/Lock.tsx
    • src/components/views/landings/web3CryptoDonation/numberedItems.tsx
    • src/components/views/landings/publicGoods/PublicGoodsFunding.tsx
    • src/components/views/homepage/introBlock/index.tsx
    • src/components/views/homepage/aboutGiveconomy/index.tsx
    • src/components/views/create/proGuide/ProjectTips/DefaultTip.tsx
    • src/components/views/donate/DonatePageProjectDescription.tsx
    • src/components/views/landings/GIVBacks/HowGIVbacksWork.tsx
    • src/components/views/landings/GIVBacks/YouKnowHow.tsx
    • src/components/views/landings/GIVBacks/WhatMakesGIVbacks.tsx
    • src/components/views/landings/onboarding/project-owner/projectOwnerSteps.tsx
    • src/components/views/landings/GIVBacks/WhatCanYouDo.tsx
    • src/components/views/landings/onboarding/main/WhatIsGiveth.tsx
    • src/components/views/landings/onboarding/main/WhatIsGIV.tsx
    • src/components/views/landings/GIVBacks/WhatAreGIVbacks.tsx
    • src/components/views/landings/onboarding/GIVeconomy/GIVeconomySteps.tsx
    • src/components/modals/FirstWelcomeModal.tsx
    • src/components/project-card/ProjectCardBadgeButtons.tsx
    • src/components/project-card/ProjectCardAlt.tsx
    • src/components/cards/GivEconomyProjectCards.tsx
    • src/components/cards/StakingCards/BaseStakingCard/StakingCardHeader.tsx
    • src/components/GIVeconomyPages/GIVpower.tsx
    • src/components/GIVeconomyPages/GIVbacks.tsx
    • src/apollo/gql/gqlProjects.ts
    • src/apollo/types/types.ts
    • src/apollo/types/gqlEnums.ts
Analysis chain

Verify the consistency and impact of the variable renaming.

The renaming of verified to isGivbackEligible improves code readability. However, please ensure this change is consistently applied throughout the codebase and doesn't break any existing logic that relies on the previous name.

Run the following script to verify the consistency and impact:

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the consistency and impact of renaming `verified` to `isGivbackEligible`.

# Test 1: Search for any remaining occurrences of `verified`. Expect: No results.
rg --type tsx --type ts --type js $'verified' -g '!yarn.lock'

# Test 2: Search for occurrences of `isGivbackEligible`. Expect: Only occurrences related to the Givback feature.
rg --type tsx --type ts --type js $'isGivbackEligible' -g '!yarn.lock' -A 5

Length of output: 191


Script:

#!/bin/bash
# Description: Verify the consistency and impact of renaming `verified` to `isGivbackEligible`.

# Test 1: Search for any remaining occurrences of `verified`. Expect: No results.
rg 'verified' --glob '*.tsx' --glob '*.ts' --glob '*.js' -g '!yarn.lock'

# Test 2: Search for occurrences of `isGivbackEligible`. Expect: Only occurrences related to the Givback feature.
rg 'isGivbackEligible' --glob '*.tsx' --glob '*.ts' --glob '*.js' -g '!yarn.lock' -A 5

Length of output: 23634

id: projectId,
status,
addresses,
Expand Down Expand Up @@ -139,7 +139,7 @@ const CryptoDonation: FC<{
});

const tokenDecimals = selectedOneTimeToken?.decimals || 18;
const projectIsGivBackEligible = !!verified;
const projectIsGivBackEligible = !!isGivbackEligible;
const { activeStartedRound } = getActiveRound(project.qfRounds);
const networkId = (chain as Chain)?.id;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ export const RecurringDonationCard = () => {
? semanticColors.punch
: brandColors.giv;

const projectIsGivBackEligible = !!project.verified;
const projectIsGivBackEligible = !!project.isGivbackEligible;

const handleDonate = () => {
if (anchorContractAddress) {
Expand Down
17 changes: 15 additions & 2 deletions src/components/views/project/ProjectBadges.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import {
neutralColors,
semanticColors,
Flex,
IconGIVBack16,
} from '@giveth/ui-design-system';
import styled from 'styled-components';
import { useIntl } from 'react-intl';
Expand All @@ -15,7 +16,8 @@ import { hasActiveRound } from '@/helpers/qf';
const ProjectBadges = () => {
const { projectData } = useProjectContext();

const { verified, qfRounds, campaigns } = projectData || {};
const { verified, isGivbackEligible, qfRounds, campaigns } =
projectData || {};
const { formatMessage } = useIntl();
const isQF = hasActiveRound(qfRounds);

Expand All @@ -28,12 +30,23 @@ const ProjectBadges = () => {
{verified && (
<ProjectBadge
badgeText={formatMessage({
id: 'label.verified',
id: 'label.vouched',
})}
wrapperColor={semanticColors.jade[700]}
BadgeIcon={<IconVerifiedBadge16 />}
/>
)}
{isGivbackEligible && (
<ProjectBadge
badgeText={formatMessage({
id: 'label.isGivbackEligible',
})}
textColor={brandColors.giv[500]}
wrapperColor={'white'}
BadgeIcon={<IconGIVBack16 color={brandColors.giv[500]} />}
/>
)}

{isQF && (
<ProjectBadge
badgeText={formatMessage({
Expand Down
Loading
Loading