Skip to content

Commit

Permalink
sdp-tech#523 fix : navigate after posting
Browse files Browse the repository at this point in the history
  • Loading branch information
youngsikkk committed Oct 23, 2023
1 parent 8a8736c commit 3715e85
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Community/CommunityUpload.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ export default function CommunityUpload({ setMode, board, format }) {
}
}
const response = await request.post("/community/posts/create/", formData, { "Content-Type": "multipart/form-data" });
window.location.reload();
const id = response.data.data.id;
navigate(`/community/${board}/${id}?page=1`);
}
const deletePhoto = (data, state, setState) => {
setState(state.filter((el) => el !== data));
Expand Down

0 comments on commit 3715e85

Please sign in to comment.