Skip to content

Commit

Permalink
feat: update the notifications in branch
Browse files Browse the repository at this point in the history
  • Loading branch information
kleyberthsantos committed Nov 20, 2024
1 parent 4611826 commit 2df32c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,9 @@ export const ConnectGuardians: React.FC<Props> = ({ next }) => {
}, [role, isAllAccepted, next]);

const handleApprove = useCallback(() => {
if (role === GuardianRole.Host) {
showSuccess(t('connect-guardians.approve'));
}
showSuccess(t('connect-guardians.approve'));
next();
}, [next, showSuccess, t, role]);
}, [next, showSuccess, t]);

let content: React.ReactNode;
if (!configGenParams) {
Expand Down
6 changes: 3 additions & 3 deletions apps/router/src/guardian-ui/setup/FederationSetup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const FederationSetup: React.FC = () => {
state: { progress, role, peers, tosConfig },
dispatch,
} = useGuardianSetupContext();
const { showSuccess, showError, showInfo } = useNotification();
const { showSuccess, showError } = useNotification();
const [confirmRestart, setConfirmRestart] = useState(false);

const setTosConfig = useCallback(
Expand Down Expand Up @@ -76,13 +76,13 @@ export const FederationSetup: React.FC = () => {
.then(() => {
dispatch({ type: SETUP_ACTION_TYPE.SET_INITIAL_STATE, payload: null });
window.scrollTo(0, 0);
showInfo(t('setup.common.restart-setup'));
showSuccess(t('setup.common.restart-success'));
})
.catch((err) => {
console.error(err);
showError(t('setup.common.restart-error'));
});
}, [api, dispatch, showInfo, showError, t]);
}, [api, dispatch, showSuccess, showError, t]);

let title: React.ReactNode;
let subtitle: React.ReactNode;
Expand Down

0 comments on commit 2df32c9

Please sign in to comment.