Skip to content

Commit

Permalink
Merged PR 33332: Remove alert when succesfully logged in in city-pass…
Browse files Browse the repository at this point in the history
… module

Remove alert when succesfully logged in in city-pass module

Related work items: #126268
  • Loading branch information
frankfe-amsterdam committed Sep 19, 2024
2 parents 560c7fc + 7a64817 commit 351ffe7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
28 changes: 10 additions & 18 deletions src/modules/city-pass/alerts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ import {
AlertVariant,
} from '@/components/ui/feedback/alert/Alert.types'

const LOGOUT_ALERT = {
text: 'Je Stadspas gegevens zijn niet meer zichtbaar in de app. Je kunt je Stadspas gegevens altijd weer zien door in te loggen.',
title: 'Uitgelogd',
hasIcon: true,
hasCloseIcon: true,
testID: 'CityPassLoggedOutAlert',
}

export const alerts = {
logoutWarning: {
variant: AlertVariant.warning,
text: 'Je Stadspas gegevens zijn niet meer zichtbaar in de app. Je kunt je Stadspas gegevens altijd weer zien door in te loggen.',
title: 'Uitgelogd',
hasIcon: true,
hasCloseIcon: true,
testID: 'CityPassLoggedOutAlert',
...LOGOUT_ALERT,
},
logoutSuccess: {
variant: AlertVariant.positive,
text: 'Je Stadspas gegevens zijn niet meer zichtbaar in de app. Je kunt je Stadspas gegevens altijd weer zien door in te loggen.',
title: 'Uitgelogd',
hasIcon: true,
hasCloseIcon: true,
testID: 'CityPassLoggedOutAlert',
...LOGOUT_ALERT,
},
logoutFailed: {
variant: AlertVariant.negative,
Expand All @@ -36,14 +36,6 @@ export const alerts = {
hasCloseIcon: true,
testID: 'CityPassLoggedInAlertNegative',
},
loginSuccess: {
variant: AlertVariant.positive,
text: 'Je Stadspas staat nu ook in de app.',
title: 'Gelukt!',
hasIcon: true,
hasCloseIcon: true,
testID: 'CityPassLoggedInAlertPositive',
},
} as const satisfies AlertsRecord

export type Alerts = keyof typeof alerts
1 change: 0 additions & 1 deletion src/modules/city-pass/screens/Dashboard.screen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export const DashboardScreen = ({navigation, route}: Props) => {
useEffect(() => {
if (loginResult === LoginResult.success) {
dispatch(setIsCityPassOwnerRegistered(true))
setAlert(alerts.loginSuccess)

if (deeplinkAccessToken && deeplinkRefreshToken) {
void setSecureItem(
Expand Down

0 comments on commit 351ffe7

Please sign in to comment.