56 lines
2.1 KiB
TypeScript
56 lines
2.1 KiB
TypeScript
// Metro module 13783 (f13784).
|
|
import { View } from "react-native";
|
|
import { createStyles } from "../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../_bundle/Module712";
|
|
import useSafetyHubLoading from "../hooks/useSafetyHubLoading";
|
|
import { BottomSheet } from "../../../design/components/Sheet/native/BottomSheet.native";
|
|
import { CircleXIcon } from "../../../design/components/Icon/native/redesign/generated/CircleXIcon";
|
|
import { Text } from "../../../design/components/Text/native/Text";
|
|
import { intl, t } from "../../../intl/index.native";
|
|
import { Button } from "../../../design/components/Button/native/Button.native";
|
|
import { getSafetyHubData } from "../SafetyHubActionCreators";
|
|
import { HermesBuiltin } from "../../../_hermes/prelude";
|
|
const useStyles = createStyles({
|
|
errorContainer: {
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: "center",
|
|
paddingTop: Module712.space.PX_8,
|
|
paddingBottom: Module712.space.PX_24,
|
|
gap: Module712.space.PX_16,
|
|
minHeight: 120
|
|
},
|
|
redesignErrorIconContainer: {
|
|
display: "flex",
|
|
justifyContent: "center",
|
|
alignItems: "center",
|
|
height: 40,
|
|
width: 40,
|
|
borderRadius: Module712.radii.round,
|
|
backgroundColor: Module712.colors.WHITE
|
|
},
|
|
redesignErrorIcon: {
|
|
height: 50,
|
|
width: 50
|
|
}
|
|
});
|
|
export default function SafetyHubErrorActionSheet(props) {
|
|
if (props == null) {
|
|
HermesBuiltin.throwTypeError("Cannot destructure 'undefined' or 'null'.");
|
|
throw new Error("unreachable");
|
|
}
|
|
const styles = useStyles();
|
|
const safetyHubLoading = useSafetyHubLoading();
|
|
return <BottomSheet>
|
|
<View style={[styles.errorContainer]}>
|
|
<View style={[styles.redesignErrorIconContainer]}>
|
|
<CircleXIcon size="custom" color={Module712.colors.CONTROL_CRITICAL_PRIMARY_BACKGROUND_DEFAULT} style={[styles.redesignErrorIcon]} />
|
|
</View>
|
|
<Text variant="heading-lg/normal">
|
|
{intl.string(t.TDRvqs)}
|
|
</Text>
|
|
</View>
|
|
<Button onPress={() => getSafetyHubData()} text={intl.string(t.R1AN4F)} loading={safetyHubLoading} disabled={safetyHubLoading} />
|
|
</BottomSheet>;
|
|
};
|