Skip to content

Commit

Permalink
remove redundant isModalVisible check
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarezmelissa87 committed Nov 14, 2019
1 parent 8a551e7 commit 14475db
Showing 1 changed file with 5 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/

import React, { Fragment, FC } from 'react';
import React, { FC } from 'react';

import { CreateAnalyticsFormProps } from '../../hooks/use_create_analytics_form';

Expand All @@ -20,13 +20,9 @@ export const CreateAnalyticsFlyoutWrapper: FC<CreateAnalyticsFormProps> = props
}

return (
<Fragment>
{isModalVisible && (
<CreateAnalyticsFlyout {...props}>
{isAdvancedEditorEnabled === false && <CreateAnalyticsForm {...props} />}
{isAdvancedEditorEnabled === true && <CreateAnalyticsAdvancedEditor {...props} />}
</CreateAnalyticsFlyout>
)}
</Fragment>
<CreateAnalyticsFlyout {...props}>
{isAdvancedEditorEnabled === false && <CreateAnalyticsForm {...props} />}
{isAdvancedEditorEnabled === true && <CreateAnalyticsAdvancedEditor {...props} />}
</CreateAnalyticsFlyout>
);
};

0 comments on commit 14475db

Please sign in to comment.