Skip to content

Commit 284a454

Browse files
committed
fix: show not found page when new write post
1 parent bcf6fff commit 284a454

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/containers/write/ActiveEditor.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ const ActiveEditor: React.FC<ActiveEditorProps> = () => {
132132
}, [dispatch, lastPostHistory, post]);
133133

134134
if (
135+
id &&
135136
!newPost &&
136137
((!readPostForEdit.loading && post === null) ||
137138
(post && post.user.id !== userId))

src/containers/write/PublishActionButtonsContainer.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ const PublishActionButtonsContainer: React.FC<
114114
await client.resetStore();
115115
history.push(`/@${user.username}/${url_slug}`);
116116
} catch (error) {
117+
console.log('write post failed', error);
117118
toast.error('포스트 작성 실패');
118119
}
119120
};
@@ -146,6 +147,7 @@ const PublishActionButtonsContainer: React.FC<
146147
await client.resetStore();
147148
history.push(`/@${user.username}/${url_slug}`);
148149
} catch (error) {
150+
console.log('edit post failed', error);
149151
toast.error('포스트 수정 실패');
150152
}
151153
};

0 commit comments

Comments
 (0)