fix(ui): keep UI form preloaded

This commit is contained in:
nick-delirium 2023-06-13 09:47:18 +02:00
parent 9c051c8412
commit 5cdce7ea22
2 changed files with 4 additions and 7 deletions

View file

@ -6,14 +6,11 @@ import Tab from 'Components/Session/Player/SharedComponents/Tab';
function SubHeader() {
const { store } = React.useContext(PlayerContext);
const { currentTab, tabs, location: currentLocation = '' } = store.get();
const { currentTab, tabs = new Set('back-compat'), location: currentLocation = 'loading...' } = store.get();
const location =
currentLocation !== undefined
? currentLocation.length > 70
const location = currentLocation.length > 70
? `${currentLocation.slice(0, 70)}...`
: currentLocation
: undefined;
: currentLocation;
return (
<>

View file

@ -21,7 +21,7 @@ function SubHeader(props) {
const defaultLocalhostWarn = localStorage.getItem(localhostWarnKey) !== '1';
const [showWarningModal, setWarning] = React.useState(defaultLocalhostWarn);
const { player, store } = React.useContext(PlayerContext);
const { width, height, endTime, location: currentLocation = '', tabs, currentTab } = store.get();
const { width, height, endTime, location: currentLocation = 'loading...', tabs = new Set('back-compat'), currentTab } = store.get();
const enabledIntegration = useMemo(() => {
const { integrations } = props;