pgadmin4/web/regression/javascript/fake_theme.js
Akshay Joshi 9f836f5433 Fixed following code smells reported by SonarQube:
1) Immediately return this expression instead of assigning it to the temporary variable.
 2) Extract this nested ternary operation into an independent statement.
 3) Expected a `for-of` loop instead of a `for` loop with this simple iteration.
2022-01-18 14:49:54 +05:30

10 lines
233 B
JavaScript

import React from 'react';
import Theme from 'sources/Theme';
export function withTheme(WrappedComp) {
// eslint-disable-next-line react/display-name
return (props)=>{
return <Theme><WrappedComp {...props}/></Theme>;
};
}