fix: add missing newlines at the end of JSON files; clean up formatting in page components
Some checks failed
Workflow / ʦ TypeScript (push) Failing after 17m4s
Workflow / ⚫️ Test (push) Has been skipped

This commit is contained in:
T. Zehetbauer
2026-04-02 11:02:58 +02:00
parent b26e5aaafa
commit c6d564836f
56 changed files with 471 additions and 381 deletions

View File

@@ -1,6 +1,7 @@
import { getTranslations } from 'next-intl/server';
import { CreatePageForm } from '@kit/site-builder/components';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { getTranslations } from 'next-intl/server';
import { AccountNotFound } from '~/components/account-not-found';
import { CmsPageShell } from '~/components/cms-page-shell';

View File

@@ -166,10 +166,7 @@ export default async function SiteBuilderDashboard({ params }: Props) {
</thead>
<tbody>
{(pages as SitePage[]).map((page) => (
<tr
key={page.id}
className="hover:bg-muted/30 border-b"
>
<tr key={page.id} className="hover:bg-muted/30 border-b">
<td className="p-3 font-medium">{page.title}</td>
<td className="text-muted-foreground p-3 font-mono text-xs">
/{page.slug}

View File

@@ -1,6 +1,7 @@
import { getTranslations } from 'next-intl/server';
import { CreatePostForm } from '@kit/site-builder/components';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import { getTranslations } from 'next-intl/server';
import { AccountNotFound } from '~/components/account-not-found';
import { CmsPageShell } from '~/components/cms-page-shell';

View File

@@ -77,10 +77,7 @@ export default async function PostsManagerPage({ params }: Props) {
</thead>
<tbody>
{(posts as SitePost[]).map((post) => (
<tr
key={post.id}
className="hover:bg-muted/30 border-b"
>
<tr key={post.id} className="hover:bg-muted/30 border-b">
<td className="p-3 font-medium">{post.title}</td>
<td className="p-3">
<Badge

View File

@@ -5,7 +5,6 @@ import { useTransition } from 'react';
import { useRouter } from 'next/navigation';
import { useTranslations } from 'next-intl';
import { toast } from '@kit/ui/sonner';
import {
AlertDialog,
@@ -19,6 +18,7 @@ import {
AlertDialogTrigger,
} from '@kit/ui/alert-dialog';
import { Button } from '@kit/ui/button';
import { toast } from '@kit/ui/sonner';
interface PublishToggleButtonProps {
pageId: string;
@@ -38,11 +38,14 @@ export function PublishToggleButton({
const handleToggle = () => {
startTransition(async () => {
try {
const response = await fetch(`/api/site-builder/pages/${pageId}/publish`, {
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ accountId, isPublished: !isPublished }),
});
const response = await fetch(
`/api/site-builder/pages/${pageId}/publish`,
{
method: 'PATCH',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ accountId, isPublished: !isPublished }),
},
);
if (!response.ok) {
toast.error(t('pages.toggleError'));