-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from pnthach95/nativewind
- Loading branch information
Showing
51 changed files
with
1,866 additions
and
2,242 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"recommendations": [ | ||
"bradlc.vscode-tailwindcss", | ||
"diemasmichiels.emulate", | ||
"dbaeumer.vscode-eslint", | ||
"lokalise.i18n-ally", | ||
"kisstkondoros.vscode-gutter-preview", | ||
"esbenp.prettier-vscode", | ||
"spmeesseman.vscode-taskexplorer" | ||
] | ||
} |
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 was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,39 @@ | ||
import React from 'react'; | ||
import {useTranslation} from 'react-i18next'; | ||
import {StyleSheet, View} from 'react-native'; | ||
import {View} from 'react-native'; | ||
import {NetworkConsumer} from 'react-native-offline'; | ||
import {Colors, Text} from 'react-native-paper'; | ||
import {Text, useTheme} from 'react-native-paper'; | ||
import {useSafeAreaInsets} from 'react-native-safe-area-context'; | ||
import AppStyles, {padding} from 'theme/styles'; | ||
|
||
/** | ||
* Connect Status | ||
*/ | ||
const ConnectStatus = () => { | ||
const {t} = useTranslation(); | ||
const {colors} = useTheme(); | ||
const insets = useSafeAreaInsets(); | ||
const safeInsets = { | ||
paddingTop: insets.top, | ||
}; | ||
const box = { | ||
backgroundColor: colors.error, | ||
}; | ||
|
||
return ( | ||
<NetworkConsumer> | ||
{({isConnected}) => | ||
isConnected ? ( | ||
<View style={safeInsets} /> | ||
) : ( | ||
<View style={[styles.box, safeInsets]}> | ||
<Text style={AppStyles.whiteText}> | ||
{t('no-internet-connection')} | ||
</Text> | ||
<View className="p-3" style={[box, safeInsets]}> | ||
<Text className="text-white">{t('no-internet-connection')}</Text> | ||
</View> | ||
) | ||
} | ||
</NetworkConsumer> | ||
); | ||
}; | ||
|
||
const styles = StyleSheet.create({ | ||
box: { | ||
backgroundColor: Colors.red600, | ||
padding, | ||
}, | ||
}); | ||
|
||
ConnectStatus.whyDidYouRender = true; | ||
|
||
export default React.memo(ConnectStatus); |
Oops, something went wrong.