Skip to content

Commit

Permalink
Refactor: 리스트 수정, 생성 페이지는 히스토리 기록에 남지 않도록 수정 (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
seoyoung-min authored Feb 24, 2024
1 parent 6e06026 commit b12a5bc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions src/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ export default function TempLayout({ children }: { children: ReactNode }) {
const { isOn, handleSetOff } = useModalState();

function kakaoInit() {
window.Kakao.init(process.env.NEXT_PUBLIC_KAKAO_API_KEY);
if (!window.Kakao.isInitialized()) {
window.Kakao.init(process.env.NEXT_PUBLIC_KAKAO_API_KEY);
}
console.log('kakaoShareStatus:', window.Kakao.isInitialized());
}

Expand All @@ -34,8 +36,7 @@ export default function TempLayout({ children }: { children: ReactNode }) {
<title>ListyWave</title>
<meta
name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1.0,
user-scalable=0"
content="width=device-width; initial-scale=1.0; maximum-scale=1.0; minimum-scale=1.0; user-scalable=no viewport-fit=cover"
/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css" />
<Script
Expand Down
2 changes: 1 addition & 1 deletion src/app/list/[listId]/edit/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export default function EditPage() {
} = useMutation({
mutationFn: updateList,
onSettled: () => {
router.push(`/user/${owner.id}/list/${param?.listId}`);
router.replace(`/list/${param?.listId}`);
},
});

Expand Down
2 changes: 1 addition & 1 deletion src/app/list/create/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export default function CreatePage() {
imageFileList: formatData().imageFileList,
});
}
router.push(`/list/${data.listId}`);
router.replace(`/list/${data.listId}`);
},
onError: () => {
toasting({ type: 'error', txt: toastMessage.ko.createListError });
Expand Down

0 comments on commit b12a5bc

Please sign in to comment.