-
Notifications
You must be signed in to change notification settings - Fork 90
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added individual codes for network errors - Cleaned up some of the code so to use the errorCode variable - Added shell changes to match network errors
- Loading branch information
1 parent
0b8f28f
commit 619d12b
Showing
6 changed files
with
81 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
packages/web-app/src/modules/error-views/NetworkErrorContainer.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { connect } from '../../connect' | ||
import { RootStore } from '../../Store' | ||
import { NetworkErrorPage } from './components/NetworkErrorPage' | ||
|
||
const mapStoreToProps = (store: RootStore) => ({ | ||
onCloseClicked: () => store.ui.hideModal(), | ||
onSendLog: store.native.sendLog, | ||
showSendLog: store.native.canSendLogs, | ||
}) | ||
|
||
export const NetworkErrorContainer = connect( | ||
mapStoreToProps, | ||
NetworkErrorPage, | ||
) |
33 changes: 33 additions & 0 deletions
33
packages/web-app/src/modules/error-views/components/NetworkErrorPage.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React, { Component } from 'react' | ||
|
||
// Components | ||
import { ErrorPage } from '../../../components/ErrorPage' | ||
|
||
interface Props { | ||
onCloseClicked?: () => void | ||
showSendLog?: boolean | ||
onSendLog?: () => void | ||
} | ||
|
||
export class NetworkErrorPage extends Component<Props> { | ||
handleSendLogClicked = () => { | ||
const { onSendLog } = this.props | ||
|
||
if (onSendLog) onSendLog() | ||
} | ||
|
||
render() { | ||
const { showSendLog, onCloseClicked } = this.props | ||
|
||
return ( | ||
<ErrorPage | ||
title="Network Error X_x" | ||
onCloseClicked={onCloseClicked} | ||
showSendLog={showSendLog} | ||
onSendLog={this.handleSendLogClicked} | ||
> | ||
<div>It appears this we are having trouble connecting to the Salad mining pool.</div> | ||
</ErrorPage> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
export * from './UnknownErrorContainer' | ||
export * from './CudaErrorContainer' | ||
export * from './AntiVirusErrorContainer' | ||
export * from './CudaErrorContainer' | ||
export * from './NetworkErrorContainer' | ||
export * from './UnknownErrorContainer' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters