From 04337648bbf81d98f27e3843891ee6661c2112ca Mon Sep 17 00:00:00 2001 From: IRBorisov <8611739+IRBorisov@users.noreply.github.com> Date: Sun, 19 May 2024 11:05:02 +0300 Subject: [PATCH] Prevent simultaneous animation warning --- .../frontend/src/components/wrap/AnimateFade.tsx | 14 +------------- .../frontend/src/components/wrap/DataLoader.tsx | 16 ++++++++++------ 2 files changed, 11 insertions(+), 19 deletions(-) diff --git a/rsconcept/frontend/src/components/wrap/AnimateFade.tsx b/rsconcept/frontend/src/components/wrap/AnimateFade.tsx index 76d428e9..bae27dd3 100644 --- a/rsconcept/frontend/src/components/wrap/AnimateFade.tsx +++ b/rsconcept/frontend/src/components/wrap/AnimateFade.tsx @@ -7,22 +7,10 @@ import { CProps } from '../props'; interface AnimateFadeProps extends CProps.AnimatedDiv { noFadeIn?: boolean; noFadeOut?: boolean; - removeContent?: boolean; hideContent?: boolean; } -function AnimateFade({ - style, - noFadeIn, - noFadeOut, - children, - removeContent, - hideContent, - ...restProps -}: AnimateFadeProps) { - if (removeContent) { - return null; - } +function AnimateFade({ style, noFadeIn, noFadeOut, children, hideContent, ...restProps }: AnimateFadeProps) { return ( - - {children} - - - Данные не загружены - + {!isLoading && !error && !hasNoData ? ( + + {children} + + ) : null} + {!isLoading && !error && hasNoData ? ( + + Данные не загружены + + ) : null} {isLoading ? : null} {error ? : null}