|
2 | 2 |
|
3 | 3 | import Button from '@/shared/components/button/Button'; |
4 | 4 | import TextButton from '@/shared/components/button/TextButton'; |
5 | | -import Input from '@/shared/components/InputBox/Input'; |
| 5 | +import Input from '@/shared/components/Input-box/Input'; |
6 | 6 | import { useState } from 'react'; |
7 | | -import { customToast } from '@/shared/components/toast/CustomToastUtils'; |
8 | | -import ModalLayout from '@/shared/components/modalPop/ModalLayout'; |
9 | | -import SelectBox from '@/domains/shared/select-box/SelectBox'; |
| 7 | +import ModalLayout from '@/shared/components/modal-pop/ModalLayout'; |
| 8 | +import SelectBox from '@/domains/shared/components/select-box/SelectBox'; |
10 | 9 |
|
11 | 10 | import Spinner from '@/shared/components/spinner/Spinner'; |
12 | 11 | import LikeBtn from '@/domains/community/components/like/LikeBtn'; |
13 | | -import Share from '@/domains/shared/share/Share'; |
14 | | -import Keep from '@/domains/shared/keep/Keep'; |
15 | | -import ConfirmModal from '@/shared/components/modalPop/ConfirmModal'; |
| 12 | +import Share from '@/domains/shared/components/share/Share'; |
| 13 | +import Keep from '@/domains/shared/components/keep/Keep'; |
| 14 | +import ConfirmModal from '@/shared/components/modal-pop/ConfirmModal'; |
| 15 | +import { useToast } from '@/shared/hook/useToast'; |
16 | 16 |
|
17 | 17 | function Page() { |
18 | 18 | const [isModalOpen, setModalOpen] = useState(false); |
19 | 19 | const [isConfirmOpen, setConfirmOpen] = useState(false); |
| 20 | + const { toastSuccess, toastInfo, toastError } = useToast(); |
20 | 21 |
|
21 | 22 | return ( |
22 | 23 | <div className="p-6 space-y-6 bg-primary"> |
@@ -78,21 +79,21 @@ function Page() { |
78 | 79 | <div className="flex gap-2"> |
79 | 80 | <button |
80 | 81 | className="px-4 py-2 bg-green-300 text-black rounded" |
81 | | - onClick={() => customToast.success('성공 메시지 \n 줄바꿈은 이렇게')} |
| 82 | + onClick={() => toastSuccess('성공 메시지 \n 줄바꿈은 이렇게')} |
82 | 83 | > |
83 | 84 | Success Toast |
84 | 85 | </button> |
85 | 86 |
|
86 | 87 | <button |
87 | 88 | className="px-4 py-2 bg-yellow-100 text-black rounded" |
88 | | - onClick={() => customToast.info('정보 메시지')} |
| 89 | + onClick={() => toastInfo('정보 메시지')} |
89 | 90 | > |
90 | 91 | Info Toast |
91 | 92 | </button> |
92 | 93 |
|
93 | 94 | <button |
94 | 95 | className="px-4 py-2 bg-red-200 text-black rounded" |
95 | | - onClick={() => customToast.error('오류 메시지')} |
| 96 | + onClick={() => toastError('오류 메시지')} |
96 | 97 | > |
97 | 98 | Error Toast |
98 | 99 | </button> |
|
0 commit comments