-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: IAP Migration Message wip * fix: Now only shows once * chore: New design and copy * chore: Updated date
- Loading branch information
Showing
11 changed files
with
130 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
projects/Mallard/src/components/Modals/IAPAppMigration.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { useNavigation } from '@react-navigation/native'; | ||
import type { NativeStackNavigationProp } from '@react-navigation/native-stack'; | ||
import React from 'react'; | ||
import { logEvent } from '../../helpers/analytics'; | ||
import { hasSeenIapMigrationMessage } from '../../helpers/storage'; | ||
import type { MainStackParamList } from '../../navigation/NavigationModels'; | ||
import { RouteNames } from '../../navigation/NavigationModels'; | ||
import { CenterWrapper } from '../CenterWrapper/CenterWrapper'; | ||
import { IAPAppMigrationModalCard } from '../iap-app-migration-modal-card'; | ||
|
||
const IAPAppMigrationModal = () => { | ||
const { navigate } = | ||
useNavigation<NativeStackNavigationProp<MainStackParamList>>(); | ||
return ( | ||
<CenterWrapper> | ||
<IAPAppMigrationModalCard | ||
onDismiss={() => { | ||
navigate(RouteNames.Issue); | ||
|
||
logEvent({ | ||
name: 'iap_app_migration_modal', | ||
value: 'iap_app_migration_modal_dismissed', | ||
}); | ||
hasSeenIapMigrationMessage.set(true); | ||
}} | ||
/> | ||
</CenterWrapper> | ||
); | ||
}; | ||
|
||
export { IAPAppMigrationModal }; |
30 changes: 30 additions & 0 deletions
30
projects/Mallard/src/components/iap-app-migration-modal-card.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
import { StyleSheet } from 'react-native'; | ||
import { copy } from '../helpers/words'; | ||
import { color } from '../theme/color'; | ||
import { CardAppearance, OnboardingCard } from './onboarding/onboarding-card'; | ||
import { UiBodyCopy } from './styled-text'; | ||
|
||
const style = StyleSheet.create({ | ||
bodyCopy: { | ||
color: color.palette.neutral[100], | ||
}, | ||
}); | ||
|
||
const IAPAppMigrationModalCard = ({ onDismiss }: { onDismiss: () => void }) => { | ||
return ( | ||
<OnboardingCard | ||
onDismissThisCard={onDismiss} | ||
title={copy.iAPMigration.title} | ||
appearance={CardAppearance.Clashy} | ||
size="medium" | ||
bottomContent={ | ||
<UiBodyCopy style={style.bodyCopy}> | ||
{copy.iAPMigration.body} | ||
</UiBodyCopy> | ||
} | ||
/> | ||
); | ||
}; | ||
|
||
export { IAPAppMigrationModalCard }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters