Skip to content

Commit

Permalink
chore: add insets
Browse files Browse the repository at this point in the history
  • Loading branch information
hevelius committed Jan 31, 2024
1 parent 59a92cf commit 1391fea
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions ts/features/fci/components/ErrorComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ import {
Pictogram,
VSpacer
} from "@pagopa/io-app-design-system";
import { SafeAreaView } from "react-native-safe-area-context";
import {
SafeAreaView,
useSafeAreaInsets
} from "react-native-safe-area-context";
import I18n from "../../../i18n";
import { WithTestID } from "../../../types/WithTestID";
import {
Expand Down Expand Up @@ -46,6 +49,7 @@ const ErrorComponent = (props: Props) => {
const signatureRequestId = useIOSelector(fciSignatureRequestIdSelector);
const assistanceToolConfig = useIOSelector(assistanceToolConfigSelector);
const choosenTool = assistanceToolRemoteConfig(assistanceToolConfig);
const insets = useSafeAreaInsets();

const zendeskAssistanceLogAndStart = () => {
resetCustomFields();
Expand Down Expand Up @@ -139,15 +143,22 @@ const ErrorComponent = (props: Props) => {
<SafeAreaView
style={IOStyles.flex}
testID={props.testID}
edges={["bottom", "left", "right"]}
edges={["left", "right"]}
>
<InfoScreenComponent
image={<Pictogram name={props.pictogram} />}
title={props.title}
body={props.subTitle}
email={props.email}
/>
<View style={IOStyles.horizontalContentPadding}>{footerButtons()}</View>
<View
style={[
IOStyles.horizontalContentPadding,
{ paddingBottom: Math.max(insets.bottom, 16) }
]}
>
{footerButtons()}
</View>
</SafeAreaView>
);
};
Expand Down

0 comments on commit 1391fea

Please sign in to comment.