Skip to content

Commit 2a7d6fc

Browse files
author
jonisaa
committed
Added switch for future possible implementations of custom types
1 parent 03c3d29 commit 2a7d6fc

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/components/group/Group.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,13 @@ class Group extends Component {
9191
try {
9292
let content = this.getContent();
9393

94-
if (layout.type == 'tabs') {
95-
return <TabsForm layout={layout} content={content}/>;
94+
if (layout.type) {
95+
switch (layout.type) {
96+
case 'tabs':
97+
return <TabsForm layout={layout} content={content}/>;
98+
default:
99+
return <NormalForm title={layout.title} content={content}/>
100+
}
96101
}
97102

98103
return <NormalForm title={layout.title} content={content}/>

0 commit comments

Comments
 (0)