Skip to content

Commit

Permalink
Merge pull request #8947 from ryanml/ftx-back-arrow-fixes
Browse files Browse the repository at this point in the history
Fixing back arrow alignment/display logic [FTX Widget]
  • Loading branch information
simonhong authored Jun 9, 2021
2 parents 2a86f5b + 3205b11 commit 4c6f795
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions components/brave_new_tab_ui/widgets/ftx/components/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,10 @@ class FTX extends React.PureComponent<Props, State> {
}

renderTitle () {
const selectedAsset = this.props.ftx.assetDetail?.currencyName
const { showContent, widgetTitle } = this.props
// Only show back arrow to go back to opt-in view
const shouldShowBackArrow = !selectedAsset &&
this.props.ftx.currentView !== ViewType.OptIn &&
const shouldShowBackArrow = showContent &&
this.props.ftx.currentView === ViewType.Markets &&
!this.props.ftx.isConnected

return (
Expand Down
2 changes: 1 addition & 1 deletion components/brave_new_tab_ui/widgets/shared/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,7 @@ export const ListItem = styled('li')<StyleProps>`
export const BackArrow = styled('div')<StyleProps>`
width: 20px;
cursor: pointer;
margin-left: ${p => p.marketView ? 60 : 0}px;
margin-left: ${p => p.marketView ? 137 : 0}px;
`

export const ActionButton = styled('button')<StyleProps>`
Expand Down

0 comments on commit 4c6f795

Please sign in to comment.