Refactor UI component and improve configuration handling

Refactored the components in the site header account section and page.tsx to improve readability. Updated the WordPress client to handle date types correctly. Adjusted the keystatic storage kind to default to 'local' if not specified in the environment variables.
This commit is contained in:
giancarlo
2024-04-20 13:31:07 +08:00
parent 8281de12a0
commit fb8e091043
4 changed files with 16 additions and 7 deletions

View File

@@ -123,7 +123,7 @@ export class WordpressClient implements CmsClient {
image,
url: item.link,
slug: item.slug,
publishedAt: new Date(item.date),
publishedAt: item.date,
categories: categories,
tags: tags,
parentId,
@@ -182,7 +182,7 @@ export class WordpressClient implements CmsClient {
title: item.title.rendered,
content: item.content.rendered,
slug: item.slug,
publishedAt: new Date(item.date),
publishedAt: item.date,
categories,
tags,
parentId: item.parent?.toString(),