Skip to content

Commit b66bf91

Browse files
♻️ refactor(types): centralize mutation types
1 parent 6a9ab19 commit b66bf91

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import type { MessageDescriptor } from "@lingui/core";
2+
3+
export type ToastMessageInput = {
4+
description: MessageDescriptor;
5+
// action?: { label: MessageDescriptor; action: () => void };
6+
};

src/frontend/lib/data/useMutate/useApiMutateOptimisticOptions.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import type { MessageDescriptor } from "@lingui/core";
21
import { msg } from "@lingui/macro";
32
import { useMutation, useQueryClient } from "@tanstack/react-query";
43

@@ -7,11 +6,7 @@ import { noop } from "@/shared/lib/noop";
76
import { fakeMessageDescriptor } from "@/translations/fake";
87

98
import { getQueryCachekey } from "../constants/getQueryCacheKey";
10-
11-
export type ToastMessageInput = {
12-
description: MessageDescriptor;
13-
// action?: { label: MessageDescriptor; action: () => void };
14-
};
9+
import type { ToastMessageInput } from "./types";
1510

1611
export interface IApiMutateOptions<T, V, R> {
1712
dataQueryPath: string;

0 commit comments

Comments
 (0)