Skip to content

Commit 5705593

Browse files
author
Mitchel Severe
committed
Quick fix to RightTabs
1 parent 91a1e55 commit 5705593

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/components/RightTabs.tsx

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,7 @@ class RightTabs extends Component<Props> {
167167
label="Component State"
168168
/> */}
169169
</Tabs>
170-
{!isEmpty(focusComponent) && (
171-
{value === 0 && (
170+
{!isEmpty(focusComponent) && value === 0 && (
172171
<div
173172
id="treeWrapper"
174173
style={{
@@ -203,10 +202,15 @@ class RightTabs extends Component<Props> {
203202
/>
204203
</div>
205204
)}
206-
{value === 1 && <CodePreview focusComponent={focusComponent} components={components} />}
207-
{value === 2 && <Props />}
208-
{value === 3 && focusChild.childType === 'HTML' && <HtmlAttr />}
209-
{value === 3 && focusChild.childType !== 'HTML' && (
205+
{!isEmpty(focusComponent) && value === 1 && (
206+
<CodePreview
207+
focusComponent={focusComponent}
208+
components={components}
209+
/>
210+
)}
211+
{!isEmpty(focusComponent) && value === 2 && <Props />}
212+
{!isEmpty(focusComponent) && value === 3 && focusChild.childType === 'HTML' && <HtmlAttr />}
213+
{!isEmpty(focusComponent) && value === 3 && focusChild.childType !== 'HTML' && (
210214
<p>Please select an HTML element to view attributes</p>
211215
)}
212216
)}

0 commit comments

Comments
 (0)