fix(ui): keep UI form preloaded
This commit is contained in:
parent
9c051c8412
commit
5cdce7ea22
2 changed files with 4 additions and 7 deletions
|
|
@ -6,14 +6,11 @@ import Tab from 'Components/Session/Player/SharedComponents/Tab';
|
||||||
|
|
||||||
function SubHeader() {
|
function SubHeader() {
|
||||||
const { store } = React.useContext(PlayerContext);
|
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 =
|
const location = currentLocation.length > 70
|
||||||
currentLocation !== undefined
|
|
||||||
? currentLocation.length > 70
|
|
||||||
? `${currentLocation.slice(0, 70)}...`
|
? `${currentLocation.slice(0, 70)}...`
|
||||||
: currentLocation
|
: currentLocation;
|
||||||
: undefined;
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ function SubHeader(props) {
|
||||||
const defaultLocalhostWarn = localStorage.getItem(localhostWarnKey) !== '1';
|
const defaultLocalhostWarn = localStorage.getItem(localhostWarnKey) !== '1';
|
||||||
const [showWarningModal, setWarning] = React.useState(defaultLocalhostWarn);
|
const [showWarningModal, setWarning] = React.useState(defaultLocalhostWarn);
|
||||||
const { player, store } = React.useContext(PlayerContext);
|
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 enabledIntegration = useMemo(() => {
|
||||||
const { integrations } = props;
|
const { integrations } = props;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue