components#LastCheckedDisplay TypeScript Examples
The following examples show how to use
components#LastCheckedDisplay.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: BluetoothDisabledView.tsx From mobile with Apache License 2.0 | 6 votes |
BluetoothDisabledView = () => {
const [i18n] = useI18n();
const toSettings = useCallback(() => {
Linking.openSettings();
}, []);
return (
<BaseHomeView>
<Box marginBottom="l">
<Icon name="icon-bluetooth-disabled" size={44} />
</Box>
<Text textAlign="center" variant="bodyTitle" color="bodyText" marginBottom="l" accessibilityRole="header">
{i18n.translate('Home.BluetoothDisabled')}
</Text>
<Text variant="bodyText" color="bodyText" textAlign="center">
{i18n.translate('Home.EnableBluetoothCTA')}
</Text>
<LastCheckedDisplay />
<Box alignSelf="stretch" marginTop="l">
<Button text={i18n.translate('Home.TurnOnBluetooth')} variant="bigFlat" onPress={toSettings} />
</Box>
</BaseHomeView>
);
}
Example #2
Source File: ExposureNotificationsDisabledView.tsx From mobile with Apache License 2.0 | 6 votes |
ExposureNotificationsDisabledView = () => {
const [i18n] = useI18n();
const startExposureNotificationService = useStartExposureNotificationService();
const enableExposureNotifications = useCallback(() => {
startExposureNotificationService();
}, [startExposureNotificationService]);
return (
<BaseHomeView>
<Box marginBottom="l">
<Icon name="icon-exposure-notifications-disabled" size={44} />
</Box>
<Text textAlign="center" variant="bodyTitle" color="bodyText" marginBottom="l" accessibilityRole="header">
{i18n.translate('Home.ExposureNotificationsDisabled')}
</Text>
<Text variant="bodyText" color="bodyText" textAlign="center">
{i18n.translate('Home.ExposureNotificationsDisabledDetailed')}
</Text>
<LastCheckedDisplay />
<Box alignSelf="stretch" marginTop="l">
<Button
text={i18n.translate('Home.EnableExposureNotificationsCTA')}
variant="bigFlat"
onPress={enableExposureNotifications}
/>
</Box>
</BaseHomeView>
);
}
Example #3
Source File: ExposureView.tsx From mobile with Apache License 2.0 | 6 votes |
ExposureView = () => {
const [i18n] = useI18n();
const onAction = useCallback(() => {
Linking.openURL(i18n.translate('Home.GuidanceUrl')).catch(error => captureException('OpenUrl', error));
}, [i18n]);
return (
<BaseHomeView>
<Text textAlign="center" variant="bodyTitle" color="bodyText" marginBottom="l" accessibilityRole="header">
{i18n.translate('Home.ExposureDetected')}
{/* No exposure detected */}
</Text>
<Text variant="bodyText" color="bodyText" textAlign="center">
{i18n.translate('Home.ExposureDetectedDetailed')}
</Text>
<LastCheckedDisplay />
<Box alignSelf="stretch" marginTop="l">
<Button text={i18n.translate('Home.SeeGuidance')} variant="bigFlat" externalLink onPress={onAction} />
</Box>
</BaseHomeView>
);
}
Example #4
Source File: NetworkDisabledView.tsx From mobile with Apache License 2.0 | 6 votes |
NetworkDisabledView = () => {
const [i18n] = useI18n();
return (
<BaseHomeView>
<Box marginBottom="l">
<Icon name="icon-offline" size={44} />
</Box>
<Text textAlign="center" variant="bodyTitle" color="bodyText" marginBottom="l" accessibilityRole="header">
{i18n.translate('Home.NoConnectivity')}
</Text>
<Text variant="bodyText" color="bodyText" textAlign="center">
{i18n.translate('Home.NoConnectivityDetailed')}
</Text>
<LastCheckedDisplay />
</BaseHomeView>
);
}
Example #5
Source File: NoExposureView.tsx From mobile with Apache License 2.0 | 6 votes |
NoExposureView = () => {
const [i18n] = useI18n();
return (
<BaseHomeView>
<Text variant="bodyTitle" color="bodyText" marginBottom="l" textAlign="center" accessibilityRole="header">
{i18n.translate('Home.NoExposureDetected')}
</Text>
<Text variant="bodyText" color="bodyText" textAlign="center">
{i18n.translate('Home.NoExposureDetectedDetailed')}
</Text>
<LastCheckedDisplay />
{/* centering looks off without this, because other screens with animations have a button */}
<Box height={50} />
</BaseHomeView>
);
}