From 5639e4c1ffcaf515b572238dc64a8487b5d08d2f Mon Sep 17 00:00:00 2001 From: Dan Peterson Date: Wed, 10 Nov 2021 13:15:40 -0600 Subject: [PATCH] Adjust some initial states to optimize initial render (#265) --- ui/page/livestream/view.jsx | 2 +- .../browserNotificationSettings/use-browser-notifications.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/page/livestream/view.jsx b/ui/page/livestream/view.jsx index 9ed8b3f72..96cf86918 100644 --- a/ui/page/livestream/view.jsx +++ b/ui/page/livestream/view.jsx @@ -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); diff --git a/web/component/browserNotificationSettings/use-browser-notifications.js b/web/component/browserNotificationSettings/use-browser-notifications.js index 64cab9dec..eb3a34372 100644 --- a/web/component/browserNotificationSettings/use-browser-notifications.js +++ b/web/component/browserNotificationSettings/use-browser-notifications.js @@ -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()));