Skip to content

Commit

Permalink
Merge pull request #509 from Kodylow/automatic-continue-congrats
Browse files Browse the repository at this point in the history
  • Loading branch information
Kodylow authored Aug 23, 2024
2 parents 74379ab + cd7747f commit 7d8f597
Show file tree
Hide file tree
Showing 13 changed files with 24 additions and 21 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { Flex, Heading, Text, Button, Icon } from '@chakra-ui/react';
import { ReactComponent as ArrowRightIcon } from '../../../../assets/svgs/arrow-right.svg';
import React, { useEffect } from 'react';
import { Flex, Heading, Text, Spinner } from '@chakra-ui/react';
import { useAppContext } from '../../../../hooks';
import { useTranslation } from '@fedimint/utils';
import { APP_ACTION_TYPE, GuardianRole, Status } from '../../../../types';
Expand All @@ -13,9 +12,13 @@ export const SetupComplete: React.FC<SetupCompleteProps> = ({ role }) => {
const { t } = useTranslation();
const { dispatch } = useAppContext();

const handleContinue = () => {
dispatch({ type: APP_ACTION_TYPE.SET_STATUS, payload: Status.Admin });
};
useEffect(() => {
const timer = setTimeout(() => {
dispatch({ type: APP_ACTION_TYPE.SET_STATUS, payload: Status.Admin });
}, 3000);

return () => clearTimeout(timer);
}, [dispatch]);

return (
<Flex
Expand All @@ -36,9 +39,9 @@ export const SetupComplete: React.FC<SetupCompleteProps> = ({ role }) => {
? t(`setup-complete.follower-message`)
: t(`setup-complete.leader-message`)}
</Text>
<Button leftIcon={<Icon as={ArrowRightIcon} />} onClick={handleContinue}>
{t('setup-complete.continue')}
</Button>
<Flex direction='column' align='center'>
<Spinner size='xl' mb={4} />
</Flex>
</Flex>
);
};
2 changes: 1 addition & 1 deletion apps/guardian-ui/src/languages/ca.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"header": "🎉 🎉 🎉",
"congratulations": "Felicitats",
"leader-message": "Tots els codis de verificació dels Guardians han estat verificats.",
"follower-message": "Ja ho has acabat! Fes clic a continuar i fes saber als altres Guardians que estàs en marxa!",
"follower-message": "Ja ho has acabat! Fes saber als altres Guardians que estàs en marxa!",
"continue": "Continuar"
},
"terms-of-service": {
Expand Down
2 changes: 1 addition & 1 deletion apps/guardian-ui/src/languages/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"header": "🎉 🎉 🎉",
"congratulations": "Herzlichen Glückwunsch",
"leader-message": "Alle Verifizierungscodes der Wächter wurden überprüft.",
"follower-message": "Du bist fertig! Klicke auf Weiter und lass die anderen Wächter wissen, dass du unterwegs bist!",
"follower-message": "Du bist fertig! Lass die anderen Wächter wissen, dass du läufst!",
"continue": "Fortsetzen"
},
"terms-of-service": {
Expand Down
2 changes: 1 addition & 1 deletion apps/guardian-ui/src/languages/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
"header": "🎉 🎉 🎉",
"congratulations": "Congratulations",
"leader-message": "All Guardians’ verification codes have been verified.",
"follower-message": "You're all done! Click continue and let the other Guardians know you're running!",
"follower-message": "You're all done! Let the other Guardians know you're running!",
"continue": "Continue"
},
"terms-of-service": {
Expand Down
2 changes: 1 addition & 1 deletion apps/guardian-ui/src/languages/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
"header": "🎉 🎉 🎉",
"congratulations": "Felicidades",
"leader-message": "Todos los códigos de verificación de los Guardianes han sido verificados.",
"follower-message": "¡Has terminado! Haz clic en continuar y avisa a los otros Guardianes que estás en marcha.",
"follower-message": "¡Ya has terminado! ¡Avisa a los otros Guardianes que estás en marcha!",
"continue": "Continuar"
},
"terms-of-service": {
Expand Down
2 changes: 1 addition & 1 deletion apps/guardian-ui/src/languages/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"header": "🎉 🎉 🎉",
"congratulations": "Félicitations",
"leader-message": "Tous les codes de vérification des Gardiens ont été vérifiés.",
"follower-message": "Vous avez terminé ! Cliquez sur continuer et faites savoir aux autres Gardiens que vous êtes en route !",
"follower-message": "Vous avez terminé ! Faites savoir aux autres Gardiens que vous êtes opérationnel !",
"continue": "Continuer"
},
"terms-of-service": {
Expand Down
2 changes: 1 addition & 1 deletion apps/guardian-ui/src/languages/hu.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"header": "🎉 🎉 🎉",
"congratulations": "Gratulálok",
"leader-message": "Minden Őr ellenőrző kódját ellenőrizték.",
"follower-message": "Minden kész! Kattints a folytatásra, és tudasd a többi Őrzővel, hogy futsz!",
"follower-message": "Minden készen áll! Értesítsd a többi Őrzőt, hogy működésben vagy!",
"continue": "Folytatás"
},
"terms-of-service": {
Expand Down
2 changes: 1 addition & 1 deletion apps/guardian-ui/src/languages/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"header": "🎉 🎉 🎉",
"congratulations": "Felicidades",
"leader-message": "Todos los códigos de verificación de los Guardianes han sido verificados.",
"follower-message": "¡Has terminado! Haz clic en continuar y avísales a los otros Guardianes que estás en marcha.",
"follower-message": "Hai finito! Fai sapere agli altri Guardiani che sei operativo!",
"continue": "Continuar"
},
"terms-of-service": {
Expand Down
2 changes: 1 addition & 1 deletion apps/guardian-ui/src/languages/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"header": "🎉 🎉 🎉",
"congratulations": "おめでとうございます",
"leader-message": "すべてのガーディアンの確認コードが確認されました。",
"follower-message": "すべて完了しました!続行をクリックして、他のガーディアンにあなたが走っていることを知らせてください",
"follower-message": "すべて完了しました!他のガーディアンにあなたが稼働していることを知らせてください",
"continue": "続ける"
},
"terms-of-service": {
Expand Down
2 changes: 1 addition & 1 deletion apps/guardian-ui/src/languages/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@
"header": "🎉 🎉 🎉",
"sentence-one": "모든 가디언의 검증 코드가 확인되었습니다.",
"leader-message": "모든 수호자의 인증 코드가 확인되었습니다.",
"follower-message": "모두 완료되었습니다! 계속을 클릭하고 다른 가디언들에게 당신이 뛰고 있다고 알려주세요!"
"follower-message": "모두 완료되었습니다! 다른 가디언들에게 당신이 실행 중이라고 알려주세요!"
},
"verify-guardians": {
"all-guardians-verified": "모든 보호자가 코드를 확인했습니다",
Expand Down
2 changes: 1 addition & 1 deletion apps/guardian-ui/src/languages/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"header": "🎉 🎉 🎉",
"congratulations": "Parabéns",
"leader-message": "Todos os códigos de verificação dos Guardiões foram verificados.",
"follower-message": "Você terminou! Clique em continuar e avise os outros Guardiões que você está correndo!",
"follower-message": "Você terminou! Avise os outros Guardiões que você está em execução!",
"continue": "Continuar"
},
"terms-of-service": {
Expand Down
2 changes: 1 addition & 1 deletion apps/guardian-ui/src/languages/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"header": "🎉 🎉 🎉",
"congratulations": "Поздравляю",
"leader-message": "Все коды подтверждения Стражей были проверены.",
"follower-message": "Вы все сделали! Нажмите \"Продолжить\" и дайте другим Стражам знать, что вы в пути!",
"follower-message": "Вы все закончили! Дайте знать другим Стражам, что вы работаете!",
"continue": "Продолжить"
},
"terms-of-service": {
Expand Down
2 changes: 1 addition & 1 deletion apps/guardian-ui/src/languages/zh.json
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@
"header": "🎉 🎉 🎉",
"congratulations": "恭喜",
"leader-message": "所有守护者的验证代码已被验证。",
"follower-message": "你完成了!点击继续,让其他守护者知道你正在运行!",
"follower-message": "你已全部完成!让其他守护者知道你正在运行!",
"continue": "继续"
},
"terms-of-service": {
Expand Down

0 comments on commit 7d8f597

Please sign in to comment.