Skip to content

Commit

Permalink
Factor condition out
Browse files Browse the repository at this point in the history
  • Loading branch information
gbalint committed Jan 10, 2024
1 parent 8cd44de commit 7cc088c
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,8 @@ const NewCanvasControlsInner = (props: NewCanvasControlsInnerProps) => {

const roomStatus = useStatus()

const multiplayerEnabled = isFeatureEnabled('Multiplayer') && roomStatus === 'connected'

const getResizeStatus = () => {
const selectedViews = localSelectedViews
if (textEditor != null || keysPressed['z']) {
Expand Down Expand Up @@ -586,7 +588,7 @@ const NewCanvasControlsInner = (props: NewCanvasControlsInnerProps) => {
</>,
)}
{when(
isFeatureEnabled('Multiplayer') && roomStatus === 'connected',
multiplayerEnabled,
<MultiplayerWrapper errorFallback={null} suspenseFallback={null}>
<MultiplayerPresence />
</MultiplayerWrapper>,
Expand Down

0 comments on commit 7cc088c

Please sign in to comment.