diff --git a/src/common/components/inline-edit/hooks/index.ts b/src/common/components/inline-edit/hooks/index.ts new file mode 100644 index 00000000..58e1b02e --- /dev/null +++ b/src/common/components/inline-edit/hooks/index.ts @@ -0,0 +1,2 @@ +export * from './use-submit-cancel-hook'; +export * from './use-position-hook'; diff --git a/src/common/components/inline-edit/use-position-hook.ts b/src/common/components/inline-edit/hooks/use-position-hook.ts similarity index 91% rename from src/common/components/inline-edit/use-position-hook.ts rename to src/common/components/inline-edit/hooks/use-position-hook.ts index 45fe77c1..5bdecabe 100644 --- a/src/common/components/inline-edit/use-position-hook.ts +++ b/src/common/components/inline-edit/hooks/use-position-hook.ts @@ -1,5 +1,5 @@ import { useCallback } from 'react'; -import { addPxSuffix, calculateCoordinateValue } from './inline-edit.utils'; +import { addPxSuffix, calculateCoordinateValue } from '../inline-edit.utils'; import { Coord, Size } from '@/core/model'; export const usePositionHook = (coords: Coord, size: Size, scale: number) => { diff --git a/src/common/components/inline-edit/use-submit-cancel-hook.ts b/src/common/components/inline-edit/hooks/use-submit-cancel-hook.ts similarity index 97% rename from src/common/components/inline-edit/use-submit-cancel-hook.ts rename to src/common/components/inline-edit/hooks/use-submit-cancel-hook.ts index 407951ed..0130aa24 100644 --- a/src/common/components/inline-edit/use-submit-cancel-hook.ts +++ b/src/common/components/inline-edit/hooks/use-submit-cancel-hook.ts @@ -1,5 +1,5 @@ import { useEffect, useRef, useState } from 'react'; -import { EditType } from './inline-edit.model'; +import { EditType } from '../inline-edit.model'; interface Configuration { editType: EditType | undefined; diff --git a/src/common/components/inline-edit/inline-edit.tsx b/src/common/components/inline-edit/inline-edit.tsx index 23ca132a..4b1cd752 100644 --- a/src/common/components/inline-edit/inline-edit.tsx +++ b/src/common/components/inline-edit/inline-edit.tsx @@ -3,8 +3,7 @@ import { Group } from 'react-konva'; import { Coord, Size } from '@/core/model'; import { HtmlEditWidget } from './components'; import { EditType } from './inline-edit.model'; -import { useSubmitCancelHook } from './use-submit-cancel-hook'; -import { usePositionHook } from './use-position-hook'; +import { useSubmitCancelHook, usePositionHook } from './hooks'; interface Props { coords: Coord;