diff --git a/.env b/.env index c5e03fe..9c16a0a 100644 --- a/.env +++ b/.env @@ -1 +1,2 @@ -NEXT_PUBLIC_KAKAO_API_KEY=021dc3000bd4e8368bea279079c36944 \ No newline at end of file +NEXT_PUBLIC_KAKAO_API_KEY=021dc3000bd4e8368bea279079c36944 +NEXT_PUBLIC_KAKAO_MAP_APP_KEY=6fdf3f59b292392fa72007a224286221 \ No newline at end of file diff --git a/components/ ShareButton/ShareButton.tsx b/components/ ShareButton/ShareButton.tsx index e3a1482..0a3547c 100644 --- a/components/ ShareButton/ShareButton.tsx +++ b/components/ ShareButton/ShareButton.tsx @@ -1,6 +1,10 @@ import { useModal } from '@/hooks/useModal'; import { usePopup } from '@/hooks/usePopup'; +import { darkModeState } from '@/states/themeState'; import Image from 'next/image'; +import { toast, ToastContainer } from 'react-toastify'; +import 'react-toastify/dist/ReactToastify.css'; +import { useRecoilValue } from 'recoil'; export function ShareButton({ type, @@ -16,18 +20,15 @@ export function ShareButton({ const text = `${title}\n\n${description}`; const encodedUrl = encodeURIComponent(url); const encodedText = encodeURIComponent(text); + const isDarkMode = useRecoilValue(darkModeState); const copyToClipboard = async (text: string) => { try { await navigator.clipboard.writeText(text); - alert('클립보드에 복사되었습니다.'); + toast.success('클립보드에 복사되었습니다.'); } catch (error) { console.error(error); - openPopup({ - popupType: 'alert', - content: '클립 보드 복사에 실패하였습니다.', - btnName: ['확인'], - }); + toast.error('클립 보드 복사에 실패하였습니다.'); } }; @@ -78,10 +79,23 @@ export function ShareButton({ objectFit="cover" className="object-cover" /> +

{title}

-

{description}

+

+ {description} +

- 공유 버튼 + 공유 버튼
); diff --git a/components/ActivityDetails/ActivityDetails.tsx b/components/ActivityDetails/ActivityDetails.tsx index b776ddb..ad7d5e1 100644 --- a/components/ActivityDetails/ActivityDetails.tsx +++ b/components/ActivityDetails/ActivityDetails.tsx @@ -27,10 +27,12 @@ import { ShareButton } from '../ ShareButton/ShareButton'; import { ActivityDetailsPageMeta } from '../MetaData/MetaData'; import useDeleteActivity from '@/hooks/myActivity/useDeleteActivity'; import { usePopup } from '@/hooks/usePopup'; +import { darkModeState } from '@/states/themeState'; export default function ActivityDetails({ id }: ActivityDetailsProps) { const router = useRouter(); const [isOpen, setIsOpen] = useState(false); + const isDarkMode = useRecoilValue(darkModeState); const [currentPage, setCurrentPage] = useState( router.query.page ? parseInt(router.query.page as string, 10) : 1 ); @@ -99,8 +101,8 @@ export default function ActivityDetails({ id }: ActivityDetailsProps) { content: '체험을 삭제하시겠어요?', btnName: ['아니오', '삭제하기'], callBackFnc: () => { - deleteMyActivityMutation.mutate(id); router.push(`/myactivity`); + deleteMyActivityMutation.mutate(id); }, }); }; @@ -147,7 +149,11 @@ export default function ActivityDetails({ id }: ActivityDetailsProps) {
위치 아이콘 )}
-
+

체험 설명