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:
@@ -79,10 +79,14 @@ function AuthButtons() {
|
||||
</div>
|
||||
|
||||
<Link href={pathsConfig.auth.signUp}>
|
||||
<Button className='group' variant={'default'}>
|
||||
<Button className="group" variant={'default'}>
|
||||
<Trans i18nKey={'auth:signUp'} />
|
||||
|
||||
<ChevronRight className={'h-4 w-4 ml-1 group-hover:translate-x-1 transition-transform duration-500'} />
|
||||
<ChevronRight
|
||||
className={
|
||||
'ml-1 h-4 w-4 transition-transform duration-500 group-hover:translate-x-1'
|
||||
}
|
||||
/>
|
||||
</Button>
|
||||
</Link>
|
||||
</div>
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
import { PricingTable } from '@kit/billing-gateway/marketing';
|
||||
import { Button } from '@kit/ui/button';
|
||||
import { Heading } from '@kit/ui/heading';
|
||||
import { Trans } from '@kit/ui/trans';
|
||||
import { cn } from '@kit/ui/utils';
|
||||
|
||||
import billingConfig from '~/config/billing.config';
|
||||
@@ -338,13 +339,17 @@ function MainCallToActionButton() {
|
||||
return (
|
||||
<div className={'flex space-x-2'}>
|
||||
<Link href={'/docs'}>
|
||||
<Button variant={'link'}>Documentation</Button>
|
||||
<Button variant={'link'}>
|
||||
<Trans i18nKey={'common:documentation'} />
|
||||
</Button>
|
||||
</Link>
|
||||
|
||||
<Link href={'/auth/sign-up'}>
|
||||
<Button>
|
||||
<span className={'flex items-center space-x-0.5'}>
|
||||
<span>Get Started</span>
|
||||
<span>
|
||||
<Trans i18nKey={'common:getStarted'} />
|
||||
</span>
|
||||
|
||||
<ChevronRight
|
||||
className={
|
||||
|
||||
@@ -22,7 +22,7 @@ const github = z.object({
|
||||
});
|
||||
|
||||
const storage = z.union([local, cloud, github]).parse({
|
||||
kind: process.env.KEYSTATIC_STORAGE_KIND,
|
||||
kind: process.env.KEYSTATIC_STORAGE_KIND ?? 'local',
|
||||
project: process.env.KEYSTATIC_STORAGE_PROJECT,
|
||||
repo: process.env.KEYSTATIC_STORAGE_REPO,
|
||||
branchPrefix: process.env.KEYSTATIC_STORAGE_BRANCH_PREFIX,
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user