fix: hide collaborator list on mobile if empty (#2938)

Co-authored-by: Lipis <lipiridis@gmail.com>
pull/2939/head
David Luzar 4 years ago committed by GitHub
parent b79ef0d428
commit 00209ef9c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -513,7 +513,8 @@ const LayerUI = ({
"transition-right": zenModeEnabled, "transition-right": zenModeEnabled,
})} })}
> >
{Array.from(appState.collaborators) {appState.collaborators.size > 0 &&
Array.from(appState.collaborators)
// Collaborator is either not initialized or is actually the current user. // Collaborator is either not initialized or is actually the current user.
.filter(([_, client]) => Object.keys(client).length !== 0) .filter(([_, client]) => Object.keys(client).length !== 0)
.map(([clientId, client]) => ( .map(([clientId, client]) => (

@ -152,6 +152,7 @@ export const MobileMenu = ({
<Stack.Col gap={4}> <Stack.Col gap={4}>
{renderCanvasActions()} {renderCanvasActions()}
{renderCustomFooter?.(true)} {renderCustomFooter?.(true)}
{appState.collaborators.size > 0 && (
<fieldset> <fieldset>
<legend>{t("labels.collaborators")}</legend> <legend>{t("labels.collaborators")}</legend>
<UserList mobile> <UserList mobile>
@ -170,6 +171,7 @@ export const MobileMenu = ({
))} ))}
</UserList> </UserList>
</fieldset> </fieldset>
)}
</Stack.Col> </Stack.Col>
</div> </div>
</Section> </Section>

Loading…
Cancel
Save