Skip to content

Commit 9e11dd2

Browse files
committed
[#143] refactor: useManager에서 참고하는 Id modal에서 참조
1 parent 65c9c04 commit 9e11dd2

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: frontend/src/components/molecules/BlockModal/BlockModal.tsx

+3-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import { jsx, css, keyframes } from '@emotion/react';
44
import { ReactPortal, MouseEvent, useRef, useEffect } from 'react';
55
import ReactDOM from 'react-dom';
66

7-
import { useRecoilState, useRecoilValue } from 'recoil';
8-
import { modalState, focusState } from '@/stores';
7+
import { useRecoilState } from 'recoil';
8+
import { modalState } from '@/stores';
99
import { useManager } from '@/hooks';
1010

1111
import TextImg from '@assets/text.png';
@@ -117,7 +117,6 @@ function ModalPortal({ children }: any): ReactPortal {
117117

118118
function BlockModal(): JSX.Element {
119119
const [modal, setModal] = useRecoilState(modalState);
120-
const focusId = useRecoilValue(focusState);
121120
const [
122121
{ block, blockIndex },
123122
{
@@ -127,7 +126,7 @@ function BlockModal(): JSX.Element {
127126
setBlock,
128127
setFocus,
129128
},
130-
] = useManager(focusId);
129+
] = useManager(modal.blockId);
131130
const modalEL = useRef<HTMLDivElement>();
132131

133132
const createBlockHandler = async (type: string) => {

0 commit comments

Comments
 (0)