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

@@ -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'));