Adjust some initial states to optimize initial render (#265)

This commit is contained in:
Dan Peterson 2021-11-10 13:15:40 -06:00 committed by GitHub
parent 8fd6382bf4
commit 5639e4c1ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View file

@ -19,7 +19,7 @@ type Props = {
export default function LivestreamPage(props: 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 [hasLivestreamClaim, setHasLivestreamClaim] = React.useState(false);

View file

@ -11,7 +11,7 @@ export default () => {
const [pushPermission, setPushPermission] = useState(window.Notification?.permission);
const [subscribed, setSubscribed] = useState(false);
const [pushEnabled, setPushEnabled] = useState(false);
const [pushSupported, setPushSupported] = useState(false);
const [pushSupported, setPushSupported] = useState(true);
const [encounteredError, setEncounteredError] = useState(false);
const [user] = useState(selectUser(store.getState()));