Skip to content

Commit 403f0fd

Browse files
committed
Persist showing View Sync Code modal when only 1 device is available
1 parent 093febb commit 403f0fd

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

components/brave_sync/ui/containers/enabledContent.tsx

+9
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,15 @@ export default class SyncEnabledContent extends React.PureComponent<Props, State
7070
}
7171
}
7272

73+
componentDidMount () {
74+
const { syncData } = this.props
75+
// if only one device is found, remind the user
76+
// at every page refresh to add a new device
77+
if (syncData.devices.length < 2) {
78+
this.setState({ viewSyncCode: true })
79+
}
80+
}
81+
7382
getDevicesRows = (devices?: any): Row[] | undefined => {
7483
if (!devices) {
7584
return

0 commit comments

Comments
 (0)