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

[NOT FOR MERGE] Fixing back arrow alignment/display logic [FTX Widget] #9054

Closed
wants to merge 1 commit into from
Closed
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
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