Skip to content

Commit 1cfd29a

Browse files
committed
chore(platform): rename OpenModalFn to OpenSettingFn
1 parent 354e4a1 commit 1cfd29a

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

packages/platform/src/app/routes/list/standard-table/DeviceModal.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { OpenModalFn } from '../../../utils/types';
1+
import type { OpenSettingFn } from '../../../utils/types';
22
import type { DeviceData } from './StandardTable';
33
import type { DSelectItem } from '@react-devui/ui/components/select';
44

@@ -15,7 +15,7 @@ export interface AppDeviceModalProps {
1515
onSuccess: () => void;
1616
}
1717

18-
function DeviceModal(props: AppDeviceModalProps, ref: React.ForwardedRef<OpenModalFn<DeviceData>>): JSX.Element | null {
18+
function DeviceModal(props: AppDeviceModalProps, ref: React.ForwardedRef<OpenSettingFn<DeviceData>>): JSX.Element | null {
1919
const { onSuccess } = props;
2020

2121
const modelApi = useAPI('/device/model');
@@ -36,7 +36,7 @@ function DeviceModal(props: AppDeviceModalProps, ref: React.ForwardedRef<OpenMod
3636
})
3737
);
3838

39-
const open = useEventCallback<OpenModalFn<DeviceData>>((device) => {
39+
const open = useEventCallback<OpenSettingFn<DeviceData>>((device) => {
4040
setVisible(true);
4141
setDevice(device);
4242

packages/platform/src/app/routes/list/standard-table/StandardTable.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { DeviceDoc, OpenModalFn, StandardQueryParams } from '../../../utils/types';
1+
import type { DeviceDoc, OpenSettingFn, StandardQueryParams } from '../../../utils/types';
22
import type { DSelectItem } from '@react-devui/ui/components/select';
33

44
import { isUndefined } from 'lodash';
@@ -27,7 +27,7 @@ interface DeviceQueryParams {
2727
}
2828

2929
export default function StandardTable(): JSX.Element | null {
30-
const deviceModalRef = useRef<OpenModalFn<DeviceData>>(null);
30+
const deviceModalRef = useRef<OpenSettingFn<DeviceData>>(null);
3131

3232
const { t } = useTranslation();
3333
const async = useAsync();

packages/platform/src/app/routes/list/standard-table/detail/Detail.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { OpenModalFn } from '../../../../utils/types';
1+
import type { OpenSettingFn } from '../../../../utils/types';
22
import type { DeviceData } from '../StandardTable';
33

44
import { isUndefined } from 'lodash';
@@ -15,7 +15,7 @@ import { AppDeviceModal } from '../DeviceModal';
1515
import styles from './Detail.module.scss';
1616

1717
export default function Detail(): JSX.Element | null {
18-
const deviceModalRef = useRef<OpenModalFn<DeviceData>>(null);
18+
const deviceModalRef = useRef<OpenSettingFn<DeviceData>>(null);
1919

2020
const { t } = useTranslation();
2121

packages/platform/src/app/utils/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
export type OpenModalFn<T> = (doc?: T) => void;
1+
export type OpenSettingFn<T> = (doc?: T) => void;
22

33
export interface StandardQueryParams {
44
sort?: string;

0 commit comments

Comments
 (0)