Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[No QA] Add a header to FullPageNotFoundView #10155

Merged
merged 3 commits into from
Aug 1, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions src/components/BlockingViews/FullPageNotFoundView.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@

import React from 'react';
import PropTypes from 'prop-types';
import {View} from 'react-native';
import BlockingView from './BlockingView';
import * as Expensicons from '../Icon/Expensicons';
import withLocalize, {withLocalizePropTypes} from '../withLocalize';
import HeaderWithCloseButton from '../HeaderWithCloseButton';
import Navigation from '../../libs/Navigation/Navigation';
import styles from '../../styles/styles';

const propTypes = {
/** Props to fetch translation features */
Expand All @@ -24,11 +28,21 @@ const defaultProps = {
const FullPageNotFoundView = (props) => {
if (props.shouldShow) {
return (
<BlockingView
icon={Expensicons.QuestionMark}
title={props.translate('notFound.notHere')}
subtitle={props.translate('notFound.pageNotFound')}
/>
<>
<HeaderWithCloseButton
shouldShowBackButton
onBackButtonPress={() => Navigation.dismissModal()}
onCloseButtonPress={() => Navigation.dismissModal()}
neil-marcellini marked this conversation as resolved.
Show resolved Hide resolved
/>
<View style={styles.flex1}>
<BlockingView
icon={Expensicons.QuestionMark}
title={props.translate('notFound.notHere')}
subtitle={props.translate('notFound.pageNotFound')}
/>
</View>
</>

);
}

Expand Down