We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent abab373 commit 0ee6b74Copy full SHA for 0ee6b74
1 file changed
app/[locale]/editor/EditorPageClient.tsx
@@ -233,9 +233,8 @@ export function EditorPageClient({ user }: EditorPageClientProps) {
233
throw new Error(body.message ?? "发布失败,请重试");
234
}
235
236
- const { slug: finalSlug } = body.data;
237
- // 跳到文章详情页
238
- router.push(`/u/${user.username}/posts/${finalSlug}`);
+ const { slug: finalSlug, authorUsername } = body.data;
+ router.push(`/u/${authorUsername}/posts/${finalSlug}`);
239
} catch (error) {
240
console.error("发布失败:", error);
241
alert(`发布失败:${error instanceof Error ? error.message : "未知错误"}`);
0 commit comments