OfflineNotice NOT rendering on Android even if you take out the conditional.
DEVELOPER NOTES:
Showing Offline Notice -
NOT rendering, even when you comment out conditional
See OfficelineNotice.js …
:
function OfflineNotice(props) {
//const netInfo = useNetInfo();
//console.log("netInfo: ", netInfo);
//if (netInfo.type !== "unknown" && netInfo.isInternetReachable === false)
return (
<View style={styles.container}>
<AppText style={styles.text}>No Internet Connection</AppText>
</View>
);
//return null;
:
container: {
alignItems: "center",
backgroundColor: colors.primary,
height: 50,
justifyContent: "center",
position: "absolute",
top: Constants.statusBarHeight,
width: "100%",
zIndex: 1,
},
CULPRIT: The zIndex:1 property is NOT working, I.e.: The offline notice is NOT rendering on top.
(It’s still hidden underneath) on Android.
Is OfflineNotice working for anyone using iOS?