cleanup(ui): Remove unused vars + minor bug fixes

This commit is contained in:
blessedcoolant
2023-05-09 19:20:10 +12:00
committed by psychedelicious
parent 15e57e3a3d
commit 7bfb5640ad
57 changed files with 103 additions and 325 deletions

View File

@ -81,12 +81,8 @@ const InvokeTabs = () => {
(state: RootState) => state.lightbox.isLightboxOpen
);
const {
shouldPinGallery,
shouldPinParametersPanel,
shouldShowGallery,
shouldShowParametersPanel,
} = useAppSelector((state: RootState) => state.ui);
const { shouldPinGallery, shouldPinParametersPanel, shouldShowGallery } =
useAppSelector((state: RootState) => state.ui);
const { t } = useTranslation();

View File

@ -1,8 +1,7 @@
import { isEqual } from 'lodash-es';
import { createSelector } from '@reduxjs/toolkit';
import { lightboxSelector } from 'features/lightbox/store/lightboxSelectors';
import { useAppDispatch, useAppSelector } from 'app/store/storeHooks';
import { PropsWithChildren, memo, useMemo } from 'react';
import { memo, useMemo } from 'react';
import { Box, Flex } from '@chakra-ui/react';
import InvokeAILogoComponent from 'features/system/components/InvokeAILogoComponent';
import OverlayScrollable from './common/OverlayScrollable';

View File

@ -1,19 +1,10 @@
import { Box, Flex } from '@chakra-ui/react';
import { useAppSelector } from 'app/store/storeHooks';
import { memo } from 'react';
import PinParametersPanelButton from '../../PinParametersPanelButton';
import { RootState } from 'app/store/store';
import Scrollable from '../../common/Scrollable';
import ParametersSlide from '../../ParametersDrawer';
import UnifiedCanvasParameters from './UnifiedCanvasParameters';
import UnifiedCanvasContentBeta from './UnifiedCanvasBeta/UnifiedCanvasContentBeta';
import UnifiedCanvasContent from './UnifiedCanvasContent';
const CanvasWorkspace = () => {
const shouldPinParametersPanel = useAppSelector(
(state: RootState) => state.ui.shouldPinParametersPanel
);
const shouldUseCanvasBetaLayout = useAppSelector(
(state: RootState) => state.ui.shouldUseCanvasBetaLayout
);
@ -23,35 +14,6 @@ const CanvasWorkspace = () => {
) : (
<UnifiedCanvasContent />
);
return (
<Flex
flexDirection={{ base: 'column-reverse', xl: 'row' }}
w="full"
h="full"
gap={4}
>
{/* {shouldPinParametersPanel ? (
<Box width="28rem" flexShrink={0} position="relative">
<Scrollable>
<UnifiedCanvasParameters />
</Scrollable>
<PinParametersPanelButton
sx={{ position: 'absolute', top: 0, insetInlineEnd: 0 }}
/>
</Box>
) : (
<ParametersSlide>
<UnifiedCanvasParameters />
</ParametersSlide>
)} */}
{shouldUseCanvasBetaLayout ? (
<UnifiedCanvasContentBeta />
) : (
<UnifiedCanvasContent />
)}
</Flex>
);
};
export default memo(CanvasWorkspace);