Skip to content

Commit 9d30a06

Browse files
rohinish404psychedelicious
authored andcommitted
fix: remaining strings
1 parent dc9a9c0 commit 9d30a06

File tree

3 files changed

+31
-24
lines changed

3 files changed

+31
-24
lines changed

invokeai/frontend/web/src/features/nodes/components/sidePanel/inspector/InspectorDataTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import { useAppSelector } from 'app/store/storeHooks';
33
import { IAINoContentFallback } from 'common/components/IAIImageFallback';
44
import DataViewer from 'features/gallery/components/ImageMetadataViewer/DataViewer';
55
import { selectNodesSlice } from 'features/nodes/store/nodesSlice';
6-
import { useTranslation } from 'react-i18next';
76
import { memo } from 'react';
7+
import { useTranslation } from 'react-i18next';
88
const selector = createMemoizedSelector(selectNodesSlice, (nodes) => {
99
const lastSelectedNodeId = nodes.selectedNodes[nodes.selectedNodes.length - 1];
1010

invokeai/frontend/web/src/features/parameters/components/Canvas/InfillAndScaling/ParamScaleBeforeProcessing.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,19 @@ import { selectOptimalDimension } from 'features/parameters/store/generationSlic
88
import { memo, useCallback, useMemo } from 'react';
99
import { useTranslation } from 'react-i18next';
1010

11-
1211
const ParamScaleBeforeProcessing = () => {
1312
const dispatch = useAppDispatch();
1413
const { t } = useTranslation();
1514
const boundingBoxScaleMethod = useAppSelector((s) => s.canvas.boundingBoxScaleMethod);
1615
const optimalDimension = useAppSelector(selectOptimalDimension);
1716

18-
const OPTIONS: ComboboxOption[] = useMemo(() => [
19-
{ label: t('modelManager.none'), value: 'none' },
20-
{ label: t('common.auto'), value: 'auto' },
21-
{ label: t('modelManager.manual'), value: 'manual' },
22-
],
23-
[t]
17+
const OPTIONS: ComboboxOption[] = useMemo(
18+
() => [
19+
{ label: t('modelManager.none'), value: 'none' },
20+
{ label: t('common.auto'), value: 'auto' },
21+
{ label: t('modelManager.manual'), value: 'manual' },
22+
],
23+
[t]
2424
);
2525

2626
const onChange = useCallback<ComboboxOnChange>(
@@ -33,7 +33,10 @@ const ParamScaleBeforeProcessing = () => {
3333
[dispatch, optimalDimension]
3434
);
3535

36-
const value = useMemo(() => OPTIONS.find((o) => o.value === boundingBoxScaleMethod), [boundingBoxScaleMethod]);
36+
const value = useMemo(
37+
() => OPTIONS.find((o) => o.value === boundingBoxScaleMethod),
38+
[boundingBoxScaleMethod, OPTIONS]
39+
);
3740

3841
return (
3942
<FormControl>

invokeai/frontend/web/src/features/workflowLibrary/components/WorkflowLibraryList.tsx

Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ const zDirection = z.enum(['ASC', 'DESC']);
4242
type Direction = z.infer<typeof zDirection>;
4343
const isDirection = (v: unknown): v is Direction => zDirection.safeParse(v).success;
4444

45-
4645
const WorkflowLibraryList = () => {
4746
const { t } = useTranslation();
4847
const workflowCategories = useStore($workflowCategories);
@@ -51,25 +50,27 @@ const WorkflowLibraryList = () => {
5150
const [query, setQuery] = useState('');
5251
const projectId = useStore($projectId);
5352

54-
const ORDER_BY_OPTIONS: ComboboxOption[] = useMemo(() => [
55-
{ value: 'opened_at', label: t('workflows.opened') },
56-
{ value: 'created_at', label: t('workflows.created') },
57-
{ value: 'updated_at', label: t('workflows.updated') },
58-
{ value: 'name', label: t('workflows.name') },
59-
],
60-
[t]
53+
const ORDER_BY_OPTIONS: ComboboxOption[] = useMemo(
54+
() => [
55+
{ value: 'opened_at', label: t('workflows.opened') },
56+
{ value: 'created_at', label: t('workflows.created') },
57+
{ value: 'updated_at', label: t('workflows.updated') },
58+
{ value: 'name', label: t('workflows.name') },
59+
],
60+
[t]
6161
);
6262

63-
const DIRECTION_OPTIONS: ComboboxOption[] = useMemo(() => [
64-
{ value: 'ASC', label: t('workflows.ascending') },
65-
{ value: 'DESC', label: t('workflows.descending') },
66-
],
67-
[t]
63+
const DIRECTION_OPTIONS: ComboboxOption[] = useMemo(
64+
() => [
65+
{ value: 'ASC', label: t('workflows.ascending') },
66+
{ value: 'DESC', label: t('workflows.descending') },
67+
],
68+
[t]
6869
);
6970

7071
const orderByOptions = useMemo(() => {
7172
return projectId ? ORDER_BY_OPTIONS.filter((option) => option.value !== 'opened_at') : ORDER_BY_OPTIONS;
72-
}, [projectId]);
73+
}, [projectId, ORDER_BY_OPTIONS]);
7374

7475
const [order_by, setOrderBy] = useState<WorkflowRecordOrderBy>(orderByOptions[0]?.value as WorkflowRecordOrderBy);
7576
const [direction, setDirection] = useState<SQLiteDirection>('ASC');
@@ -120,7 +121,10 @@ const WorkflowLibraryList = () => {
120121
},
121122
[direction]
122123
);
123-
const valueDirection = useMemo(() => DIRECTION_OPTIONS.find((o) => o.value === direction), [direction]);
124+
const valueDirection = useMemo(
125+
() => DIRECTION_OPTIONS.find((o) => o.value === direction),
126+
[direction, DIRECTION_OPTIONS]
127+
);
124128

125129
const resetFilterText = useCallback(() => {
126130
setQuery('');

0 commit comments

Comments
 (0)