Skip to content

Commit

Permalink
Persist showing View Sync Code modal when only 1 device is available
Browse files Browse the repository at this point in the history
  • Loading branch information
cezaraugusto committed Dec 17, 2019
1 parent 093febb commit 403f0fd
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions components/brave_sync/ui/containers/enabledContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ export default class SyncEnabledContent extends React.PureComponent<Props, State
}
}

componentDidMount () {
const { syncData } = this.props
// if only one device is found, remind the user
// at every page refresh to add a new device
if (syncData.devices.length < 2) {
this.setState({ viewSyncCode: true })
}
}

getDevicesRows = (devices?: any): Row[] | undefined => {
if (!devices) {
return
Expand Down

0 comments on commit 403f0fd

Please sign in to comment.