This commit is contained in:
Morten Olsen
2023-06-16 11:10:50 +02:00
commit bc0d501d98
163 changed files with 16458 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
import { useLinear } from '.';
const withLinear = <TProps extends object>(
Component: React.ComponentType<TProps>,
FallBack: React.ComponentType<object>,
) => {
const WrappedComponent: React.FC<TProps> = (props) => {
const linear = useLinear();
if (!linear.client) {
return <FallBack />;
}
return <Component {...props} />;
};
return WrappedComponent;
};
export { withLinear };