From 8d800fee70f933330fe48fa132e0245bfbf47c87 Mon Sep 17 00:00:00 2001 From: Manan Jadhav Date: Tue, 21 Dec 2021 22:35:04 +0530 Subject: [PATCH 01/26] feat(error-page): First draft of the page with the content --- .../ErrorBoundary/BaseErrorBoundary.js | 3 +- src/components/GenericErrorView/index.js | 65 +++++++++++++++++++ src/languages/en.js | 8 +++ src/styles/styles.js | 4 ++ src/styles/variables.js | 1 + 5 files changed, 80 insertions(+), 1 deletion(-) create mode 100644 src/components/GenericErrorView/index.js diff --git a/src/components/ErrorBoundary/BaseErrorBoundary.js b/src/components/ErrorBoundary/BaseErrorBoundary.js index 69dee3ecfc86..3f96e3ad280e 100644 --- a/src/components/ErrorBoundary/BaseErrorBoundary.js +++ b/src/components/ErrorBoundary/BaseErrorBoundary.js @@ -1,6 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import BootSplash from '../../libs/BootSplash'; +import GenericErrorView from '../GenericErrorView'; const propTypes = { /* A message posted to `logError` (along with error data) when this component intercepts an error */ @@ -43,7 +44,7 @@ class BaseErrorBoundary extends React.Component { render() { if (this.state.hasError) { // For the moment we've decided not to render any fallback UI - return null; + return ; } return this.props.children; diff --git a/src/components/GenericErrorView/index.js b/src/components/GenericErrorView/index.js new file mode 100644 index 000000000000..a6bb9e6f58e7 --- /dev/null +++ b/src/components/GenericErrorView/index.js @@ -0,0 +1,65 @@ +import React from 'react'; +import {View} from 'react-native'; +import Icon from '../Icon'; +import defaultTheme from '../../styles/themes/default'; +import * as Expensicons from '../Icon/Expensicons'; +import ExpensifyText from '../ExpensifyText'; +import Button from '../Button'; +import LogoWordmark from '../../../assets/images/expensify-wordmark.svg'; +import withLocalize, {withLocalizePropTypes} from '../withLocalize'; +import variables from '../../styles/variables'; +import styles from '../../styles/styles'; + +const propTypes = { + ...withLocalizePropTypes, +}; + +const GenericErrorView = (props) => { + const refreshPage = () => { + + }; + + return ( + + + + + + + + + {props.translate('genericErrorView.title')} + + + + {props.translate('genericErrorView.body.helpTextMobile')} + + + + {props.translate('genericErrorView.body.helpTextConcierge')} + + + +