Skip to content

Commit c9ee16a

Browse files
committed
Chore: route 수정
1 parent f2b844b commit c9ee16a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

components/modal/AddModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import { useRouter } from "next/router";
1212
const AddModal = ({ list, link }: { list: FolderItemType[]; link: string }) => {
1313
const [selectedId, setSelectedId] = useState<number | null>(null);
1414
const { closeModal } = useModalStore();
15-
const route = useRouter();
15+
const router = useRouter();
1616

1717
const handleSubmit = async () => {
1818
const body = {
@@ -25,7 +25,7 @@ const AddModal = ({ list, link }: { list: FolderItemType[]; link: string }) => {
2525
try {
2626
await postLink(body);
2727
toast.success(toastMessages.success.addLink);
28-
route.push(`/link?folder=${selectedId}`);
28+
router.push(`/link?folder=${selectedId}`);
2929
} catch (error) {
3030
toast.error(toastMessages.error.addLink);
3131
} finally {

components/modal/DeleteFolderModal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const DeleteFolderModal = ({
1616
linkCount: number;
1717
}) => {
1818
const { closeModal } = useModalStore();
19-
const route = useRouter();
19+
const router = useRouter();
2020
const handleSubmit = async () => {
2121
// 폴더 내에 링크 개수 0 일때만 폴더 삭제 가능 -> 링크 1개 이상이면 error toast 띄우고 있음 or 전체 링크 삭제 후 폴더 삭제
2222
if (linkCount !== 0) {
@@ -26,7 +26,7 @@ const DeleteFolderModal = ({
2626
try {
2727
await deleteFolder(folderId);
2828
toast.success(toastMessages.success.deleteFolder);
29-
route.push("/link");
29+
router.push("/link");
3030
} catch (error) {
3131
toast.error(toastMessages.error.deleteFolder);
3232
} finally {

0 commit comments

Comments
 (0)