Skip to content

Commit

Permalink
Merge pull request #569 from developerjhp/Fix/url-568
Browse files Browse the repository at this point in the history
[Fix] 게시글주소 통일 close #568
  • Loading branch information
developerjhp authored Mar 18, 2022
2 parents ce3d2fd + 5273898 commit d9b881e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
7 changes: 2 additions & 5 deletions client/src/components/PostEdit/PostEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export default function PostEditor({
isImage: isImage,
})
.then((res) =>
navigate(`/detail?boardId=${boardId}&postId=${res.data.id}`, {
navigate(`/detail?postId=${res.data.id}`, {
replace: true,
}),
)
Expand All @@ -128,10 +128,7 @@ export default function PostEditor({
content: content,
isImage: isImage,
})
.then(
() =>
(window.location.href = `/detail?boardId=${boardId}&postId=${urlId}`),
)
.then(() => (window.location.href = `/detail?postId=${urlId}`))
.catch((err) => console.log(err));
}
};
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/Board/Board.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ export default function Board() {
</form>
</Search>
<WritingButton>
<Link to={`/writing?=boardId=${id}`}>
<Link to={`/writing?boardId=${id}`}>
<input type="button" value="글쓰기" />
</Link>
</WritingButton>
Expand Down
2 changes: 1 addition & 1 deletion client/src/pages/Board/Search.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ export default function Board() {
</form>
</Search>
<WritingButton>
<Link to={`/writing?=boardId=${id}`}>
<Link to={`/writing?boardId=${id}`}>
<input type="button" value="글쓰기" />
</Link>
</WritingButton>
Expand Down

0 comments on commit d9b881e

Please sign in to comment.