-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
7fab506
commit e5de495
Showing
3 changed files
with
70 additions
and
6 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
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
48 changes: 48 additions & 0 deletions
48
packages/mobile/src/components/premium-track-purchase-drawer/PurchaseUnavailable.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,48 @@ | ||
import React from 'react' | ||
|
||
import { View } from 'react-native' | ||
|
||
import IconError from 'app/assets/images/iconError.svg' | ||
import { Text } from 'app/components/core' | ||
import { flexRowCentered, makeStyles } from 'app/styles' | ||
import { spacing } from 'app/styles/spacing' | ||
import { useColor } from 'app/utils/theme' | ||
|
||
const messages = { | ||
unavailable: | ||
"Unfortunately, you can't make purchases on this device. To continue, please use a desktop browser." | ||
} | ||
|
||
const useStyles = makeStyles(({ spacing, typography, palette }) => ({ | ||
container: { | ||
...flexRowCentered(), | ||
width: '100%', | ||
paddingHorizontal: spacing(3), | ||
paddingVertical: spacing(4), | ||
gap: spacing(4), | ||
borderColor: palette.borderStrong, | ||
borderRadius: spacing(2), | ||
borderWidth: 1, | ||
backgroundColor: palette.backgroundSurface2 | ||
}, | ||
textContainer: { | ||
flexShrink: 1 | ||
}, | ||
disclaimer: { | ||
lineHeight: 20 | ||
} | ||
})) | ||
|
||
export const PurchaseUnavailable = () => { | ||
const styles = useStyles() | ||
const neutral = useColor('neutral') | ||
|
||
return ( | ||
<View style={styles.container}> | ||
<IconError fill={neutral} width={spacing(6)} height={spacing(6)} /> | ||
<View style={styles.textContainer}> | ||
<Text style={styles.disclaimer}>{messages.unavailable}</Text> | ||
</View> | ||
</View> | ||
) | ||
} |