diff --git a/app/admin/(components)/ThemeInfo/ThemeImage.tsx b/app/admin/(components)/ThemeInfo/ThemeImage.tsx deleted file mode 100644 index 909a121..0000000 --- a/app/admin/(components)/ThemeInfo/ThemeImage.tsx +++ /dev/null @@ -1,80 +0,0 @@ -import Image from "next/image"; -import React, { useRef, useState } from "react"; - -import Tooltip from "@/admin/(components)/Tooltip/Container"; -import Dialog from "@/components/common/Dialog-new/Image-Dialog-new/Dialog"; -import PreviewDialog from "@/components/common/Dialog-new/Preview-Dialog-new/PreviewDialog"; -import useModal from "@/hooks/useModal"; - -export default function ThemeImage() { - const QuestionProps = { - src: "/images/svg/icon_question.svg", - alt: "gallery_image", - width: 24, - height: 24, - }; - - const previewProps = { - src: "/images/svg/icon_preview.svg", - alt: "NEXT ROOM", - width: 120, - height: 120, - }; - const { open } = useModal(); - - const imgInputRef = useRef(null); - const handleAddImageBtnClick = () => { - // 숨겨진 input 클릭 트리거 - // imgInputRef.current?.click(); - open(Dialog); - }; - const handlePreviewImageBtnClick = () => { - // 숨겨진 input 클릭 트리거 - // imgInputRef.current?.click(); - open(PreviewDialog); - }; - const [isHovered, setIsHovered] = useState(false); - - return ( -
-
- 타이머 배경 -
- setIsHovered(true)} - onMouseLeave={() => setIsHovered(false)} - className="tooptip-button" - {...QuestionProps} - /> - {isHovered && } -
-
-
-
- -
- -
-
- - - -
-
- ); -} diff --git a/app/admin/(components)/ThemeInfo/ThemeTimerImage.tsx b/app/admin/(components)/ThemeInfo/ThemeTimerImage.tsx index 054cff7..c577428 100644 --- a/app/admin/(components)/ThemeInfo/ThemeTimerImage.tsx +++ b/app/admin/(components)/ThemeInfo/ThemeTimerImage.tsx @@ -1,5 +1,5 @@ import Image from "next/image"; -import React, { ChangeEvent, useRef } from "react"; +import React, { ChangeEvent, useRef, useState } from "react"; import Dialog from "@/components/common/Dialog-new/Image-Dialog-new/Dialog"; import PreviewDialog from "@/components/common/Dialog-new/Preview-Dialog-new/PreviewDialog"; @@ -8,6 +8,7 @@ import { useTimerImageWrite } from "@/components/atoms/timerImage.atom"; import { useSelectedThemeValue } from "@/components/atoms/selectedTheme.atom"; import { defaultTimerImage, QuestionIconProps } from "@/admin/(consts)/sidebar"; import DeleteDialog from "@/components/common/Dialog-new/Timer-Image-Delete-Dialog/DeleteDialog"; +import Tooltip from "@/admin/(components)/Tooltip/Container"; export default function ThemeTimerImage() { const selectedTheme = useSelectedThemeValue(); @@ -52,12 +53,19 @@ export default function ThemeTimerImage() { const handleDelTimerImageBtnClick = () => { open(DeleteDialog); }; + const [isHovered, setIsHovered] = useState(false); return (
타이머 배경 - + setIsHovered(true)} + onMouseLeave={() => setIsHovered(false)} + className="tooptip-button" + /> + {isHovered && }
diff --git a/app/admin/Admin.tsx b/app/admin/Admin.tsx index fd93752..88dee7e 100644 --- a/app/admin/Admin.tsx +++ b/app/admin/Admin.tsx @@ -57,6 +57,7 @@ function Admin() { selectedTheme, handleClickSelected, isOpen: toast.isOpen, + isLoading, }; return ; diff --git a/app/admin/AdminView.tsx b/app/admin/AdminView.tsx index 521ca17..73a5394 100644 --- a/app/admin/AdminView.tsx +++ b/app/admin/AdminView.tsx @@ -7,6 +7,7 @@ import Toast from "@/components/common/Toast/Toast"; import NotiDialog from "@/components/common/Dialog-new/Noti-Dialog-new/Dialog"; import useModal from "@/hooks/useModal"; import { getLocalStorage } from "@/utils/storageUtil"; +import Loader from "@/components/Loader/Loader"; interface Theme { id: number; @@ -19,19 +20,22 @@ interface Props { categories: Theme[]; selectedTheme: Theme; isOpen: boolean; + isLoading: boolean; handleClickSelected: (theme: Theme) => void; } function AdminView(props: Props) { - const { isOpen } = props; - const { open } = useModal(); + const { isOpen, isLoading } = props; + const { open, closeAll } = useModal(); const isHideDialog = getLocalStorage("hideDialog"); useEffect(() => { + closeAll(); if (!isHideDialog) { open(NotiDialog, { type: "put" }); } }, []); + if (isLoading) return ; return (