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

Error boundary #1882

Merged
merged 8 commits into from
Oct 13, 2020
Merged
Show file tree
Hide file tree
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
19 changes: 13 additions & 6 deletions app/components/Views/ActivityView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import TransactionsView from '../TransactionsView';
import TabBar from '../../Base/TabBar';
import { strings } from '../../../../locales/i18n';
import FiatOrdersView from '../FiatOrdersView';
import ErrorBoundary from '../ErrorBoundary';

const styles = StyleSheet.create({
wrapper: {
Expand All @@ -30,12 +31,18 @@ function ActivityView({ hasOrders, ...props }) {
);

return (
<View style={styles.wrapper}>
<ScrollableTabView renderTabBar={hasOrders && TabBar} locked={!hasOrders} page={!hasOrders ? 0 : undefined}>
<TransactionsView tabLabel={strings('transactions_view.title')} />
{hasOrders && <FiatOrdersView tabLabel={strings('fiat_on_ramp.purchases')} />}
</ScrollableTabView>
</View>
<ErrorBoundary view="ActivityView">
<View style={styles.wrapper}>
<ScrollableTabView
renderTabBar={hasOrders && TabBar}
locked={!hasOrders}
page={!hasOrders ? 0 : undefined}
>
<TransactionsView tabLabel={strings('transactions_view.title')} />
{hasOrders && <FiatOrdersView tabLabel={strings('fiat_on_ramp.purchases')} />}
</ScrollableTabView>
</View>
</ErrorBoundary>
);
}

Expand Down
Loading