mirror of
https://github.com/suitenumerique/meet.git
synced 2026-08-09 18:29:59 +00:00
wip allow skipping the pre join using skipPreJoin params
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
import { useSearch } from 'wouter'
|
||||
|
||||
export const useSkipPreJoinParam = () => {
|
||||
const search = useSearch()
|
||||
const params = new URLSearchParams(search)
|
||||
return params.get('skipPreJoin') === 'True'
|
||||
}
|
||||
@@ -14,6 +14,7 @@ import {
|
||||
isRoomValid,
|
||||
normalizeRoomId,
|
||||
} from '@/features/rooms/utils/isRoomValid'
|
||||
import { useSkipPreJoinParam } from '@/features/rooms/hooks/useSkipPreJoinParam.ts'
|
||||
|
||||
export type LocalUserChoices = LocalUserChoicesLK & {
|
||||
processorSerialized?: ProcessorSerialized
|
||||
@@ -28,7 +29,9 @@ export const Room = () => {
|
||||
const [location, setLocation] = useLocation()
|
||||
const initialRoomData = history.state?.initialRoomData
|
||||
const mode = isLoggedIn && history.state?.create ? 'create' : 'join'
|
||||
const skipJoinScreen = isLoggedIn && mode === 'create'
|
||||
|
||||
const skipPreJoin = useSkipPreJoinParam()
|
||||
const skipJoinScreen = (isLoggedIn && mode === 'create') || skipPreJoin
|
||||
|
||||
useKeyboardShortcuts()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user