diff --git a/frontend/components/ui/resizable-dialog.tsx b/frontend/components/ui/resizable-dialog.tsx index 0bf369de..facb07ca 100644 --- a/frontend/components/ui/resizable-dialog.tsx +++ b/frontend/components/ui/resizable-dialog.tsx @@ -95,10 +95,7 @@ const ResizableDialogContent = React.forwardRef< return ((acc << 5) - acc) + char.charCodeAt(0); }, 0); stableIdRef.current = `modal-${Math.abs(hash).toString(36)}`; - // console.log("๐Ÿ”„ ResizableDialog - className ๊ธฐ๋ฐ˜ ID ์ƒ์„ฑ:", { - className, - generatedId: stableIdRef.current, - }); + // console.log("๐Ÿ”„ ResizableDialog - className ๊ธฐ๋ฐ˜ ID ์ƒ์„ฑ:", { className, generatedId: stableIdRef.current }); } else if (userStyle) { // userStyle ๊ธฐ๋ฐ˜ ID ์ƒ์„ฑ const styleStr = JSON.stringify(userStyle); @@ -106,10 +103,7 @@ const ResizableDialogContent = React.forwardRef< return ((acc << 5) - acc) + char.charCodeAt(0); }, 0); stableIdRef.current = `modal-${Math.abs(hash).toString(36)}`; - // console.log("๐Ÿ”„ ResizableDialog - userStyle ๊ธฐ๋ฐ˜ ID ์ƒ์„ฑ:", { - userStyle, - generatedId: stableIdRef.current, - }); + // console.log("๐Ÿ”„ ResizableDialog - userStyle ๊ธฐ๋ฐ˜ ID ์ƒ์„ฑ:", { userStyle, generatedId: stableIdRef.current }); } else { // ๊ธฐ๋ณธ ID stableIdRef.current = 'modal-default'; @@ -171,13 +165,7 @@ const ResizableDialogContent = React.forwardRef< const [wasOpen, setWasOpen] = React.useState(false); React.useEffect(() => { - // console.log("๐Ÿ” ๋ชจ๋‹ฌ ์ƒํƒœ ๋ณ€ํ™” ๊ฐ์ง€:", { - actualOpen, - wasOpen, - externalOpen, - contextOpen: context.open, - effectiveModalId - }); + // console.log("๐Ÿ” ๋ชจ๋‹ฌ ์ƒํƒœ ๋ณ€ํ™” ๊ฐ์ง€:", { actualOpen, wasOpen, externalOpen, contextOpen: context.open, effectiveModalId }); if (actualOpen && !wasOpen) { // ๋ชจ๋‹ฌ์ด ๋ฐฉ๊ธˆ ์—ด๋ฆผ @@ -194,11 +182,7 @@ const ResizableDialogContent = React.forwardRef< // modalId๊ฐ€ ๋ณ€๊ฒฝ๋˜๋ฉด ์ดˆ๊ธฐํ™” ๋ฆฌ์…‹ (๋‹ค๋ฅธ ๋ชจ๋‹ฌ์ด ์—ด๋ฆฐ ๊ฒฝ์šฐ) React.useEffect(() => { if (effectiveModalId !== lastModalId) { - // console.log("๐Ÿ”„ ๋ชจ๋‹ฌ ID ๋ณ€๊ฒฝ ๊ฐ์ง€, ์ดˆ๊ธฐํ™” ๋ฆฌ์…‹:", { - ์ด์ „: lastModalId, - ํ˜„์žฌ: effectiveModalId, - isInitialized, - }); + // console.log("๐Ÿ”„ ๋ชจ๋‹ฌ ID ๋ณ€๊ฒฝ ๊ฐ์ง€, ์ดˆ๊ธฐํ™” ๋ฆฌ์…‹:", { ์ด์ „: lastModalId, ํ˜„์žฌ: effectiveModalId, isInitialized }); setIsInitialized(false); setUserResized(false); // ์‚ฌ์šฉ์ž ๋ฆฌ์‚ฌ์ด์ง• ํ”Œ๋ž˜๊ทธ๋„ ๋ฆฌ์…‹ setLastModalId(effectiveModalId); @@ -207,11 +191,7 @@ const ResizableDialogContent = React.forwardRef< // ๋ชจ๋‹ฌ์ด ์—ด๋ฆด ๋•Œ ์ดˆ๊ธฐ ํฌ๊ธฐ ์„ค์ • (localStorage์™€ ๋‚ด์šฉ ํฌ๊ธฐ ์ค‘ ํฐ ๊ฐ’ ์‚ฌ์šฉ) React.useEffect(() => { - // console.log("๐Ÿ” ์ดˆ๊ธฐ ํฌ๊ธฐ ์„ค์ • useEffect ์‹คํ–‰:", { - isInitialized, - hasContentRef: !!contentRef.current, - effectiveModalId, - }); + // console.log("๐Ÿ” ์ดˆ๊ธฐ ํฌ๊ธฐ ์„ค์ • useEffect ์‹คํ–‰:", { isInitialized, hasContentRef: !!contentRef.current, effectiveModalId }); if (!isInitialized) { // ๋‚ด์šฉ์˜ ์‹ค์ œ ํฌ๊ธฐ ์ธก์ • (์•ฝ๊ฐ„์˜ ์ง€์—ฐ ํ›„, contentRef๊ฐ€ ์ค€๋น„๋  ๋•Œ๊นŒ์ง€ ๋Œ€๊ธฐ) @@ -231,22 +211,9 @@ const ResizableDialogContent = React.forwardRef< contentWidth = contentRef.current.scrollWidth || defaultWidth; contentHeight = contentRef.current.scrollHeight || defaultHeight; - // console.log("๐Ÿ“ ๋ชจ๋‹ฌ ๋‚ด์šฉ ํฌ๊ธฐ ์ธก์ •:", { - attempt: attempts, - scrollWidth: contentRef.current.scrollWidth, - scrollHeight: contentRef.current.scrollHeight, - clientWidth: contentRef.current.clientWidth, - clientHeight: contentRef.current.clientHeight, - contentWidth, - contentHeight, - }); + // console.log("๐Ÿ“ ๋ชจ๋‹ฌ ๋‚ด์šฉ ํฌ๊ธฐ ์ธก์ •:", { attempt: attempts, scrollWidth: contentRef.current.scrollWidth, scrollHeight: contentRef.current.scrollHeight, clientWidth: contentRef.current.clientWidth, clientHeight: contentRef.current.clientHeight, contentWidth, contentHeight }); } else { - // console.log("โš ๏ธ contentRef ์—†์Œ, ์žฌ์‹œ๋„:", { - attempt: attempts, - maxAttempts, - defaultWidth, - defaultHeight - }); + // console.log("โš ๏ธ contentRef ์—†์Œ, ์žฌ์‹œ๋„:", { attempt: attempts, maxAttempts, defaultWidth, defaultHeight }); // contentRef๊ฐ€ ์•„์ง ์—†์œผ๋ฉด ์žฌ์‹œ๋„ if (attempts < maxAttempts) { @@ -275,12 +242,7 @@ const ResizableDialogContent = React.forwardRef< const storageKey = `modal_size_${effectiveModalId}_${userId}`; const saved = localStorage.getItem(storageKey); - // console.log("๐Ÿ“ฆ localStorage ํ™•์ธ:", { - effectiveModalId, - userId, - storageKey, - saved: saved ? "์žˆ์Œ" : "์—†์Œ", - }); + // console.log("๐Ÿ“ฆ localStorage ํ™•์ธ:", { effectiveModalId, userId, storageKey, saved: saved ? "์žˆ์Œ" : "์—†์Œ" }); if (saved) { const parsed = JSON.parse(saved); @@ -299,12 +261,7 @@ const ResizableDialogContent = React.forwardRef< finalSize = savedSize; setUserResized(true); - // console.log("โœ… ์ตœ์ข… ํฌ๊ธฐ (์‚ฌ์šฉ์ž๊ฐ€ ์„ค์ •ํ•œ ํฌ๊ธฐ ์šฐ์„  ์ ์šฉ):", { - savedSize, - contentBasedSize, - finalSize, - note: "์‚ฌ์šฉ์ž๊ฐ€ ๋ฆฌ์‚ฌ์ด์ง•ํ•œ ํฌ๊ธฐ๋ฅผ ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค", - }); + // console.log("โœ… ์ตœ์ข… ํฌ๊ธฐ (์‚ฌ์šฉ์ž๊ฐ€ ์„ค์ •ํ•œ ํฌ๊ธฐ ์šฐ์„  ์ ์šฉ):", { savedSize, contentBasedSize, finalSize, note: "์‚ฌ์šฉ์ž๊ฐ€ ๋ฆฌ์‚ฌ์ด์ง•ํ•œ ํฌ๊ธฐ๋ฅผ ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉํ•ฉ๋‹ˆ๋‹ค" }); } else { // console.log("โ„น๏ธ ์ž๋™ ๊ณ„์‚ฐ๋œ ํฌ๊ธฐ๋Š” ๋ฌด์‹œ, ๋‚ด์šฉ ํฌ๊ธฐ ์‚ฌ์šฉ"); } @@ -384,13 +341,7 @@ const ResizableDialogContent = React.forwardRef< userResized: true, // ์‚ฌ์šฉ์ž๊ฐ€ ์ง์ ‘ ๋ฆฌ์‚ฌ์ด์ง•ํ–ˆ์Œ์„ ํ‘œ์‹œ }; localStorage.setItem(storageKey, JSON.stringify(currentSize)); - // console.log("๐Ÿ’พ localStorage์— ํฌ๊ธฐ ์ €์žฅ (์‚ฌ์šฉ์ž ๋ฆฌ์‚ฌ์ด์ง•):", { - effectiveModalId, - userId, - storageKey, - size: currentSize, - stateSize: { width: size.width, height: size.height }, - }); + // console.log("๐Ÿ’พ localStorage์— ํฌ๊ธฐ ์ €์žฅ (์‚ฌ์šฉ์ž ๋ฆฌ์‚ฌ์ด์ง•):", { effectiveModalId, userId, storageKey, size: currentSize, stateSize: { width: size.width, height: size.height } }); } catch (error) { // console.error("โŒ ๋ชจ๋‹ฌ ํฌ๊ธฐ ์ €์žฅ ์‹คํŒจ:", error); }