mirror of
https://github.com/owncast/owncast.git
synced 2024-11-26 14:56:14 +03:00
Restore the loading state of the app. Closes #2195
This commit is contained in:
parent
9b31ee11ac
commit
7967106fcc
2 changed files with 13 additions and 11 deletions
|
@ -95,15 +95,19 @@ const MobileContent = ({
|
||||||
socialHandles,
|
socialHandles,
|
||||||
extraPageContent,
|
extraPageContent,
|
||||||
messages,
|
messages,
|
||||||
chatDisplayName,
|
currentUser,
|
||||||
chatUserId,
|
|
||||||
showChat,
|
showChat,
|
||||||
}) => {
|
}) => {
|
||||||
|
if (!currentUser) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const { id, displayName } = currentUser;
|
||||||
|
|
||||||
const chatContent = showChat && (
|
const chatContent = showChat && (
|
||||||
<ChatContainer
|
<ChatContainer
|
||||||
messages={messages}
|
messages={messages}
|
||||||
usernameToHighlight={chatDisplayName}
|
usernameToHighlight={displayName}
|
||||||
chatUserId={chatUserId}
|
chatUserId={id}
|
||||||
isModerator={false}
|
isModerator={false}
|
||||||
height="40vh"
|
height="40vh"
|
||||||
/>
|
/>
|
||||||
|
@ -208,11 +212,6 @@ export const Content: FC = () => {
|
||||||
window.addEventListener('resize', checkIfMobile);
|
window.addEventListener('resize', checkIfMobile);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
if (!currentUser) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
const { id: currentUserId, displayName } = currentUser;
|
|
||||||
const showChat = !chatDisabled && isChatAvailable && isChatVisible;
|
const showChat = !chatDisabled && isChatAvailable && isChatVisible;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -274,8 +273,7 @@ export const Content: FC = () => {
|
||||||
socialHandles={socialHandles}
|
socialHandles={socialHandles}
|
||||||
extraPageContent={extraPageContent}
|
extraPageContent={extraPageContent}
|
||||||
messages={messages}
|
messages={messages}
|
||||||
chatDisplayName={displayName}
|
currentUser={currentUser}
|
||||||
chatUserId={currentUserId}
|
|
||||||
showChat={showChat}
|
showChat={showChat}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
|
|
|
@ -11,6 +11,10 @@ export const Sidebar: FC = () => {
|
||||||
const currentUser = useRecoilValue(currentUserAtom);
|
const currentUser = useRecoilValue(currentUserAtom);
|
||||||
const messages = useRecoilValue<ChatMessage[]>(visibleChatMessagesSelector);
|
const messages = useRecoilValue<ChatMessage[]>(visibleChatMessagesSelector);
|
||||||
|
|
||||||
|
if (!currentUser) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
const { id, isModerator, displayName } = currentUser;
|
const { id, isModerator, displayName } = currentUser;
|
||||||
return (
|
return (
|
||||||
<Sider className={styles.root} collapsedWidth={0} width={320}>
|
<Sider className={styles.root} collapsedWidth={0} width={320}>
|
||||||
|
|
Loading…
Reference in a new issue