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

Adding retry button for eligibility flow #5004

Merged
merged 1 commit into from
Feb 6, 2025
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
1 change: 1 addition & 0 deletions lang/ct.json
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@
"label.go_to_projets_page": "Anar a la pàgina de projectes",
"label.great_projects_make_the_giveconomy_thrive": "Els grans projectes fan que la GIVeconomia prosperi! Com a propietari d'un projecte, quan obtens una insígnia de 'Elegible per a GIVbacks', els teus donants es tornen elegibles per rebre GIVbacks.",
"label.guess_what_you_are_awsome": "Endevina què? Ets increïble!",
"label.retry": "Torna-ho a intentar",
"label.harvest": "Collita",
"label.harvest_pending": "Collita pendent",
"label.harvest_rewards": "Recol·lecta les recompenses",
Expand Down
1 change: 1 addition & 0 deletions lang/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@
"label.go_to_projets_page": "Go to Projects page",
"label.great_projects_make_the_giveconomy_thrive": "Great projects make the GIVeconomy thrive! As a project owner, when you get a 'GIVbacks Eligible' badge, your donors become eligible to receive GIVbacks.",
"label.guess_what_you_are_awsome": "Guess what? You’re awesome!",
"label.retry": "Retry",
"label.harvest": "Harvest",
"label.harvest_pending": "Harvest pending",
"label.harvest_rewards": "Harvest Rewards",
Expand Down
1 change: 1 addition & 0 deletions lang/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@
"label.go_to_projets_page": "Ir a los Proyectos",
"label.great_projects_make_the_giveconomy_thrive": "¡Los grandes proyectos hacen que la GIVeconomía prospere! Como propietario de un proyecto, cuando obtienes una insignia de 'Elegible para GIVbacks', tus donantes se vuelven elegibles para recibir GIVbacks.",
"label.guess_what_you_are_awsome": "¿Adivina qué? ¡Eres increíble!",
"label.retry": "Reintentar",
"label.harvest": "Recolectar",
"label.harvest_pending": "Recolección pendiente",
"label.harvest_rewards": "Obtener Recompensas",
Expand Down
43 changes: 37 additions & 6 deletions src/components/views/userProfile/QFDonorEligibilityCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -269,12 +269,26 @@ export const QFDonorEligibilityCard = () => {
</EligibilityCardBottom>
)}
{passportState === EPassportState.ERROR && (
<InlineToast
type={EToastType.Error}
message={formatMessage({
id: 'label.passport.error',
})}
/>
<>
<ErrorInlineToast
type={EToastType.Error}
message={formatMessage({
id: 'label.passport.error',
})}
/>
<ReplyButton onClick={refreshScore}>
<FlexCenter gap='8px'>
<Button
label={formatMessage({
id: 'label.retry',
})}
size='medium'
buttonType='primary'
onClick={refreshScore}
/>
</FlexCenter>
</ReplyButton>
</>
)}
{passportState === EPassportState.INVALID && (
<>
Expand Down Expand Up @@ -358,3 +372,20 @@ const BoldText = styled.strong`
font-weight: 600;
text-transform: capitalize;
`;

const ErrorInlineToast = styled(InlineToast)`
margin-bottom: 0.5em;
`;

const ReplyButton = styled.div`
& button {
color: ${brandColors.pinky[500]};
background-color: white;
font-size: 14px !important;
filter: drop-shadow(0px 3px 20px rgba(83, 38, 236, 0.13));
}

& button:hover {
color: white;
}
`;
Loading