Skip to content

Commit

Permalink
Update Control Panel's showGenerated condition (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahbedouch committed Aug 9, 2023
1 parent 046b813 commit d3ba8f0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions viser/client/src/ControlPanel/ControlPanel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ export default function ControlPanel(props: {

// TODO: will result in unnecessary re-renders
const viewer = React.useContext(ViewerContext)!;
const showGenerated =
Object.keys(viewer.useGui((state) => state.guiConfigFromId)).length > 0;
const showGenerated = viewer.useGui((state) => 'root' in state.guiIdSetFromContainerId);
const [showSettings, { toggle }] = useDisclosure(false);
const [collapsed, { toggle: toggleCollapse }] = useDisclosure(false);
const handleContents = (
Expand Down

0 comments on commit d3ba8f0

Please sign in to comment.