aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-05-12 05:21:56 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-05-18 02:02:55 +0800
commit807250510ac5be9ef7cd291aa16db64a5eff1418 (patch)
treecfd64b625596f1a7b90f4f510e764f3953c0eb7b /packages/website
parentef1e9743465d40cb3a2c3a1479155437694951b9 (diff)
downloaddexon-sol-tools-807250510ac5be9ef7cd291aa16db64a5eff1418.tar.gz
dexon-sol-tools-807250510ac5be9ef7cd291aa16db64a5eff1418.tar.zst
dexon-sol-tools-807250510ac5be9ef7cd291aa16db64a5eff1418.zip
Add props to back button
Diffstat (limited to 'packages/website')
-rw-r--r--packages/website/ts/components/portal/portal.tsx22
1 files changed, 13 insertions, 9 deletions
diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx
index 70c99921c..fb047a28a 100644
--- a/packages/website/ts/components/portal/portal.tsx
+++ b/packages/website/ts/components/portal/portal.tsx
@@ -275,7 +275,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
private _renderMenu(routeComponentProps: RouteComponentProps<any>) {
return (
<div>
- <BackButton />
+ <BackButton to={`${WebsitePaths.Portal}`} labelText={'back to Relayers'} />
<PortalMenu selectedPath={routeComponentProps.location.pathname} />
</div>
);
@@ -285,7 +285,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
const trackedTokens = _.filter(allTokens, t => t.isTracked);
return (
<div>
- <Title titleText={'Your Account'} />
+ <Title labelText={'Your Account'} />
<Wallet
userAddress={this.props.userAddress}
networkId={this.props.networkId}
@@ -333,7 +333,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
const trackedTokens = _.filter(allTokens, t => t.isTracked);
return (
<div>
- <Title titleText={'Your Account'} />
+ <Title labelText={'Your Account'} />
<TokenBalances
blockchain={this._blockchain}
blockchainErr={this.props.blockchainErr}
@@ -381,7 +381,7 @@ export class Portal extends React.Component<PortalProps, PortalState> {
private _renderRelayerIndex() {
return (
<div>
- <Title titleText={'Explore 0x Relayers'} />
+ <Title labelText={'Explore 0x Relayers'} />
<RelayerIndex networkId={this.props.networkId} />
</div>
);
@@ -442,26 +442,30 @@ export class Portal extends React.Component<PortalProps, PortalState> {
}
interface TitleProps {
- titleText: string;
+ labelText: string;
}
const Title = (props: TitleProps) => {
return (
<div className="py3" style={styles.title}>
- {props.titleText}
+ {props.labelText}
</div>
);
};
-const BackButton = () => {
+interface BackButtonProps {
+ to: string;
+ labelText: string;
+}
+const BackButton = (props: BackButtonProps) => {
return (
<div style={{ height: 65, paddingTop: 25 }}>
- <Link to={`${WebsitePaths.Portal}`} style={{ textDecoration: 'none' }}>
+ <Link to={props.to} style={{ textDecoration: 'none' }}>
<div className="flex right" style={{ ...styles.backButton, paddingTop: 10 }}>
<div style={{ marginLeft: 12 }}>
<i style={styles.backButtonIcon} className={`zmdi zmdi-arrow-left`} />
</div>
<div style={{ marginLeft: 12, marginRight: 12 }}>
- <div style={{ fontSize: 16, color: colors.lightGrey }}>back to Relayers</div>
+ <div style={{ fontSize: 16, color: colors.lightGrey }}>{props.labelText}</div>
</div>
</div>
</Link>