-
Notifications
You must be signed in to change notification settings - Fork 312
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adds csv dep * removes buggy success notification from activity panel and adds export button in header * sets up working boilerplate for CSV download * updates snapshots * fixes notification weirdness in activity page and adds export functionality * updates snapshots * adds dismiss functionality to info notification * refactor of TransactionHistory.jsx * Updated TOLL to BRDG token with new supply * chore: fixes contacts layout (#1810) * fixes broken layout bug in contacts panel * removes unnused styles * adds working implementation of error boundary around app * removes hardcoded error * styles error page * removes hard coded errors * refactors validation in ContactForm.jsx * reimplements dynamic token hash fetch * bumps version in package.json * feature: activity export enhancements (#1836) * adds disable state to tx history component fixes default file name and location * fixes linting errors * removes commented out import * fixes css bug
- Loading branch information
1 parent
e0ca2cf
commit 3014fbd
Showing
20 changed files
with
406 additions
and
85 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
// @flow | ||
import React, { Component } from 'react' | ||
import { Link } from 'react-router-dom' | ||
|
||
import styles from './Main.scss' | ||
import Button from '../../Button' | ||
import { ROUTES } from '../../../core/constants' | ||
import themes from '../../../themes' | ||
import Arrow from '../../../assets/icons/arrow.svg' | ||
import lightLogo from '../../../assets/images/logo-light.png' | ||
import darkLogo from '../../../assets/images/logo-dark.png' | ||
|
||
type Props = { | ||
children: React$Node, | ||
theme: string, | ||
logout: () => void, | ||
} | ||
|
||
type State = { | ||
hasError: boolean, | ||
} | ||
|
||
export default class ErrorBoundary extends Component<Props, State> { | ||
constructor(props: Props) { | ||
super(props) | ||
this.state = { hasError: false } | ||
} | ||
|
||
componentDidCatch(error: Error, info: any) { | ||
console.warn('An unkown error has occurred!', { error, info }) | ||
this.setState({ hasError: true }) | ||
} | ||
|
||
render() { | ||
const { theme, children, logout } = this.props | ||
const dynamicImage = theme === 'Light' ? lightLogo : darkLogo | ||
|
||
if (this.state.hasError) { | ||
return ( | ||
<div style={themes[theme]} className={styles.errorContainer}> | ||
<img className={styles.logo} src={dynamicImage} alt="" /> | ||
<h1>Oops something went wrong...</h1> | ||
<Link to={ROUTES.HOME}> | ||
<Button | ||
renderIcon={() => <Arrow />} | ||
shouldCenterButtonLabelText | ||
className={styles.backButton} | ||
onClick={() => { | ||
logout() | ||
this.setState({ hasError: false }) | ||
}} | ||
primary | ||
> | ||
Back to Login | ||
</Button> | ||
</Link> | ||
</div> | ||
) | ||
} | ||
|
||
return children | ||
} | ||
} |
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,18 @@ | ||
.errorContainer { | ||
height: 100%; | ||
width: 100%; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
.logo { | ||
width: 172px; | ||
margin-bottom: 24px; | ||
} | ||
|
||
.backButton { | ||
width: 250px; | ||
margin-top: 48px; | ||
} |
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,20 @@ | ||
// @flow | ||
import { compose } from 'recompose' | ||
import { withActions } from 'spunky' | ||
|
||
import Main from './Main' | ||
import withThemeData from '../../../hocs/withThemeData' | ||
import { logoutActions } from '../../../actions/authActions' | ||
|
||
type Props = { | ||
logout: Function, | ||
} | ||
|
||
const mapActionsToProps = (actions): Props => ({ | ||
logout: () => actions.call(), | ||
}) | ||
|
||
export default compose( | ||
withActions(logoutActions, mapActionsToProps), | ||
withThemeData(), | ||
)(Main) |
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
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
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
Oops, something went wrong.