Adjust some initial states to optimize initial render (#265)
This commit is contained in:
parent
8fd6382bf4
commit
5639e4c1ff
2 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ type Props = {
|
||||||
|
|
||||||
export default function LivestreamPage(props: Props) {
|
export default function LivestreamPage(props: Props) {
|
||||||
const { uri, claim, doSetPlayingUri, isAuthenticated, doUserSetReferrer, channelClaim, chatDisabled } = props;
|
const { uri, claim, doSetPlayingUri, isAuthenticated, doUserSetReferrer, channelClaim, chatDisabled } = props;
|
||||||
const [isLive, setIsLive] = React.useState(false);
|
const [isLive, setIsLive] = React.useState(true);
|
||||||
const livestreamChannelId = channelClaim && channelClaim.signing_channel && channelClaim.signing_channel.claim_id;
|
const livestreamChannelId = channelClaim && channelClaim.signing_channel && channelClaim.signing_channel.claim_id;
|
||||||
const [hasLivestreamClaim, setHasLivestreamClaim] = React.useState(false);
|
const [hasLivestreamClaim, setHasLivestreamClaim] = React.useState(false);
|
||||||
|
|
||||||
|
|
|
@ -11,7 +11,7 @@ export default () => {
|
||||||
const [pushPermission, setPushPermission] = useState(window.Notification?.permission);
|
const [pushPermission, setPushPermission] = useState(window.Notification?.permission);
|
||||||
const [subscribed, setSubscribed] = useState(false);
|
const [subscribed, setSubscribed] = useState(false);
|
||||||
const [pushEnabled, setPushEnabled] = useState(false);
|
const [pushEnabled, setPushEnabled] = useState(false);
|
||||||
const [pushSupported, setPushSupported] = useState(false);
|
const [pushSupported, setPushSupported] = useState(true);
|
||||||
const [encounteredError, setEncounteredError] = useState(false);
|
const [encounteredError, setEncounteredError] = useState(false);
|
||||||
|
|
||||||
const [user] = useState(selectUser(store.getState()));
|
const [user] = useState(selectUser(store.getState()));
|
||||||
|
|
Loading…
Reference in a new issue