chore(ui): lint

This commit is contained in:
psychedelicious 2023-12-09 00:00:05 +11:00
parent b271474812
commit 95a3c89a56
5 changed files with 25 additions and 33 deletions

View File

@ -49,9 +49,8 @@ export const addBoardIdSelectedListener = () => {
if (isSuccess) {
// the board was just changed - we can select the first image
const { data: boardImagesData } = imagesApi.endpoints.listImages.select(
queryArgs
)(getState());
const { data: boardImagesData } =
imagesApi.endpoints.listImages.select(queryArgs)(getState());
if (boardImagesData) {
const firstImage = imagesSelectors.selectAll(boardImagesData)[0];

View File

@ -25,16 +25,16 @@ const SelectionOverlay = ({ isSelected, isHovered }: Props) => {
? 'hoverSelected.light'
: 'selected.light'
: isHovered
? 'hoverUnselected.light'
: undefined,
? 'hoverUnselected.light'
: undefined,
_dark: {
shadow: isSelected
? isHovered
? 'hoverSelected.dark'
: 'selected.dark'
: isHovered
? 'hoverUnselected.dark'
: undefined,
? 'hoverUnselected.dark'
: undefined,
},
}}
/>

View File

@ -34,8 +34,8 @@ const selector = createSelector(
a.value === 'none'
? -1
: b.value === 'none'
? 1
: a.label.localeCompare(b.label)
? 1
: a.label.localeCompare(b.label)
)
.filter(
(d) =>

View File

@ -1,4 +1,5 @@
import { Flex } from '@chakra-ui/react';
import ParamIterations from 'features/parameters/components/Parameters/Core/ParamIterations';
import QueueControls from 'features/queue/components/QueueControls';
import ResizeHandle from 'features/ui/components/tabs/ResizeHandle';
import { usePanelStorage } from 'features/ui/hooks/usePanelStorage';
@ -11,7 +12,6 @@ import {
import 'reactflow/dist/style.css';
import InspectorPanel from './inspector/InspectorPanel';
import WorkflowPanel from './workflow/WorkflowPanel';
import ParamIterations from 'features/parameters/components/Parameters/Core/ParamIterations';
const NodeEditorPanelGroup = () => {
const [isTopPanelCollapsed, setIsTopPanelCollapsed] = useState(false);
@ -65,8 +65,8 @@ const NodeEditorPanelGroup = () => {
isTopPanelCollapsed
? 'top'
: isBottomPanelCollapsed
? 'bottom'
: undefined
? 'bottom'
: undefined
}
/>
<Panel

View File

@ -371,9 +371,8 @@ export const imagesApi = api.injectEndpoints({
categories,
};
const currentCache = imagesApi.endpoints.listImages.select(queryArgs)(
getState()
);
const currentCache =
imagesApi.endpoints.listImages.select(queryArgs)(getState());
const { data } = IMAGE_CATEGORIES.includes(imageDTO.image_category)
? boardsApi.endpoints.getBoardImagesTotal.select(
@ -540,9 +539,8 @@ export const imagesApi = api.injectEndpoints({
categories,
};
const currentCache = imagesApi.endpoints.listImages.select(
queryArgs
)(getState());
const currentCache =
imagesApi.endpoints.listImages.select(queryArgs)(getState());
const { data } = IMAGE_CATEGORIES.includes(imageDTO.image_category)
? boardsApi.endpoints.getBoardImagesTotal.select(
@ -655,9 +653,8 @@ export const imagesApi = api.injectEndpoints({
categories,
};
const currentCache = imagesApi.endpoints.listImages.select(
queryArgs
)(getState());
const currentCache =
imagesApi.endpoints.listImages.select(queryArgs)(getState());
const { data } = IMAGE_CATEGORIES.includes(imageDTO.image_category)
? boardsApi.endpoints.getBoardImagesTotal.select(
@ -1081,9 +1078,8 @@ export const imagesApi = api.injectEndpoints({
// $cache = board_id/[images|assets]
const queryArgs = { board_id: board_id ?? 'none', categories };
const currentCache = imagesApi.endpoints.listImages.select(queryArgs)(
getState()
);
const currentCache =
imagesApi.endpoints.listImages.select(queryArgs)(getState());
// IF it eligible for insertion into existing $cache
// "eligible" means either:
@ -1223,9 +1219,8 @@ export const imagesApi = api.injectEndpoints({
// $cache = no_board/[images|assets]
const queryArgs = { board_id: 'none', categories };
const currentCache = imagesApi.endpoints.listImages.select(queryArgs)(
getState()
);
const currentCache =
imagesApi.endpoints.listImages.select(queryArgs)(getState());
// IF it eligible for insertion into existing $cache
// "eligible" means either:
@ -1370,9 +1365,8 @@ export const imagesApi = api.injectEndpoints({
categories,
};
const currentCache = imagesApi.endpoints.listImages.select(
queryArgs
)(getState());
const currentCache =
imagesApi.endpoints.listImages.select(queryArgs)(getState());
const { data } = IMAGE_CATEGORIES.includes(imageDTO.image_category)
? boardsApi.endpoints.getBoardImagesTotal.select(
@ -1518,9 +1512,8 @@ export const imagesApi = api.injectEndpoints({
categories,
};
const currentCache = imagesApi.endpoints.listImages.select(
queryArgs
)(getState());
const currentCache =
imagesApi.endpoints.listImages.select(queryArgs)(getState());
const { data } = IMAGE_CATEGORIES.includes(imageDTO.image_category)
? boardsApi.endpoints.getBoardImagesTotal.select(