Skip to content

Commit ef8c6b9

Browse files
committed
Fixes velopert#7
1 parent 4d5e874 commit ef8c6b9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/containers/velog/hooks/useApplyVelogConfig.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,12 @@ export default function useApplyVelogConfig(username: string) {
5353
);
5454
}, [data, dispatch, showNotFound, username]);
5555

56-
if (data && ssrEnabled) {
56+
if (ssrEnabled && data && data.velog_config === null) {
57+
showNotFound();
58+
return;
59+
}
60+
61+
if (data && ssrEnabled && data.velog_config) {
5762
dispatch(
5863
header.actions.enterUserVelog({
5964
username,
@@ -64,8 +69,4 @@ export default function useApplyVelogConfig(username: string) {
6469
}),
6570
);
6671
}
67-
68-
if (ssrEnabled && data && data.velog_config === null) {
69-
showNotFound();
70-
}
7172
}

0 commit comments

Comments
 (0)