From 14c465080182b4a385f95903543438d43327ee46 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Fri, 28 Jul 2023 19:03:29 +1200 Subject: [PATCH] fix: Lint Errors (returning possible null component) --- .../sdxl/components/ParamSDXLPromptArea.tsx | 44 ++-- .../sdxl/components/SDXLConcatLink.tsx | 195 +++++++++--------- 2 files changed, 120 insertions(+), 119 deletions(-) diff --git a/invokeai/frontend/web/src/features/sdxl/components/ParamSDXLPromptArea.tsx b/invokeai/frontend/web/src/features/sdxl/components/ParamSDXLPromptArea.tsx index 233894e280..61719cea3f 100644 --- a/invokeai/frontend/web/src/features/sdxl/components/ParamSDXLPromptArea.tsx +++ b/invokeai/frontend/web/src/features/sdxl/components/ParamSDXLPromptArea.tsx @@ -13,6 +13,10 @@ export default function ParamSDXLPromptArea() { (state: RootState) => state.ui.shouldPinParametersPanel ); + const shouldConcatSDXLStylePrompt = useAppSelector( + (state: RootState) => state.sdxl.shouldConcatSDXLStylePrompt + ); + return ( - - - - - - + {shouldConcatSDXLStylePrompt && ( + + + + )} + {shouldConcatSDXLStylePrompt && ( + + + + )} diff --git a/invokeai/frontend/web/src/features/sdxl/components/SDXLConcatLink.tsx b/invokeai/frontend/web/src/features/sdxl/components/SDXLConcatLink.tsx index e9c3e0a6ab..c4a7caf1d5 100644 --- a/invokeai/frontend/web/src/features/sdxl/components/SDXLConcatLink.tsx +++ b/invokeai/frontend/web/src/features/sdxl/components/SDXLConcatLink.tsx @@ -1,112 +1,105 @@ import { Box, Flex } from '@chakra-ui/react'; -import { RootState } from 'app/store/store'; -import { useAppSelector } from 'app/store/storeHooks'; import { motion } from 'framer-motion'; import { FaLink } from 'react-icons/fa'; export default function SDXLConcatLink() { - const shouldConcatSDXLStylePrompt = useAppSelector( - (state: RootState) => state.sdxl.shouldConcatSDXLStylePrompt - ); return ( - shouldConcatSDXLStylePrompt && ( - + + - - - - - - - ) + + + + ); }