fix(news): restore publication flow and deduplicate dashboard friends
This commit is contained in:
1 parent
ef94646d60
commit
9b0ea2fb16
22 files changed
+638
-195
No files matched your search
@@ -31,6 +31,8 @@ export default async function EditArticle({
|
||||
title: WebsiteArticles.title,
|
||||
shortStory: WebsiteArticles.shortStory,
|
||||
fullStory: WebsiteArticles.fullStory,
|
||||
status: WebsiteArticles.status,
|
||||
publishAt: WebsiteArticles.publishAt,
|
||||
image: WebsiteArticles.image,
|
||||
})
|
||||
.from(WebsiteArticles)
|
||||
@@ -63,7 +65,7 @@ export default async function EditArticle({
|
||||
action={async (fd) => {
|
||||
"use server";
|
||||
fd.set("id", String(article.id));
|
||||
await updateArticle(fd);
|
||||
return updateArticle(fd);
|
||||
}}
|
||||
defaultValues={{
|
||||
title: article.title,
|
||||
@@ -71,6 +73,8 @@ export default async function EditArticle({
|
||||
image: article.image,
|
||||
shortStory: article.shortStory,
|
||||
fullStory: article.fullStory,
|
||||
status: article.status,
|
||||
publishAt: article.publishAt?.toISOString(),
|
||||
}}
|
||||
/>
|
||||
<form action={deleteArticle} style={{ marginTop: "1rem" }}>
|
||||
|
||||
Reference in new issue
Block a user