fix: edit button url

This commit is contained in:
DIYgod
2023-03-03 16:17:38 +00:00
parent 56e8c09810
commit e3bc5485e9
2 changed files with 4 additions and 1 deletions
+3 -1
View File
@@ -112,7 +112,9 @@ export const PostMeta: React.FC<{
{showEdit && (
<UniLink
className="xlog-post-editor inline-flex items-center"
href={`${SITE_URL}/dashboard/${site?.username}/editor?id=${page.id}`}
href={`${SITE_URL}/dashboard/${site?.username}/editor?id=${
page.id
}&type=${page.tags?.includes("post") ? "post" : "page"}`}
>
<PencilSquareIcon className="w-4 h-4 mx-1 inline-block" /> Edit
</UniLink>
+1
View File
@@ -57,6 +57,7 @@ export async function createOrUpdatePage(
customUnidata?: Unidata,
newbieToken?: string,
) {
console.log("isPost", input.isPost)
if (!input.published) {
return await (customUnidata || unidata).notes.set(
{