Skip to content

Commit

Permalink
Restore the correct tab when returning to step 1
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasKalbertodt authored and luniki committed Jan 28, 2020
1 parent 813f845 commit d12ddae
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/ui/studio/video-setup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,14 @@ export default function VideoSetup(props) {
const BOTH = 'both';
const DISPLAY = 'display';
const USER = 'user';
const [activeTab, setActiveTab] = useState(
(bothSupported && BOTH) || (displaySupported && DISPLAY) || (userSupported && USER)
);

const tab = (displayStream && userStream && BOTH)
|| (displayStream && DISPLAY)
|| (userStream && USER)
|| (bothSupported && BOTH)
|| (displaySupported && DISPLAY)
|| (userSupported && USER);
const [activeTab, setActiveTab] = useState(tab);

const handleTabChange = useCallback(
(event, value) => {
Expand Down

0 comments on commit d12ddae

Please sign in to comment.