mirror of
				https://gitlab.nic.cz/turris/reforis/foris-js.git
				synced 2025-11-03 23:00:31 +01:00 
			
		
		
		
	Fix for withEither
This commit is contained in:
		@@ -24,18 +24,18 @@ Spinner.defaultProps = {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
export function Spinner({
 | 
			
		||||
    fullScreen, children, className, ...props
 | 
			
		||||
    fullScreen, children, className,
 | 
			
		||||
}) {
 | 
			
		||||
    if (!fullScreen) {
 | 
			
		||||
        return (
 | 
			
		||||
            <div className={`spinner-wrapper ${className || "my-3 text-center"}`} {...props}>
 | 
			
		||||
            <div className={`spinner-wrapper ${className || "my-3 text-center"}`}>
 | 
			
		||||
                <SpinnerElement>{children}</SpinnerElement>
 | 
			
		||||
            </div>
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return (
 | 
			
		||||
        <div className="spinner-fs-wrapper" {...props}>
 | 
			
		||||
        <div className="spinner-fs-wrapper">
 | 
			
		||||
            <div className="spinner-fs-background">
 | 
			
		||||
                <SpinnerElement>{children}</SpinnerElement>
 | 
			
		||||
            </div>
 | 
			
		||||
 
 | 
			
		||||
@@ -14,7 +14,7 @@ import { ErrorMessage } from "./ErrorMessage";
 | 
			
		||||
function withEither(conditionalFn, Either) {
 | 
			
		||||
    return (Component) => (props) => {
 | 
			
		||||
        if (conditionalFn(props)) {
 | 
			
		||||
            return <Either />;
 | 
			
		||||
            return <Either {...props} />;
 | 
			
		||||
        }
 | 
			
		||||
        return <Component {...props} />;
 | 
			
		||||
    };
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user