feat: enhance accessibility and testing with data-test attributes and improve error handling
This commit is contained in:
@@ -20,7 +20,7 @@ export default async function EditPageRoute({ params }: Props) {
|
||||
|
||||
const api = createSiteBuilderApi(client);
|
||||
const page = await api.getPage(pageId);
|
||||
if (!page) return <div>Seite nicht gefunden</div>;
|
||||
if (!page) return <AccountNotFound />;
|
||||
|
||||
return (
|
||||
<SiteEditor
|
||||
|
||||
@@ -69,7 +69,7 @@ export default async function SiteBuilderDashboard({ params }: Props) {
|
||||
)}
|
||||
</div>
|
||||
<Link href={`/home/${account}/site-builder/new`}>
|
||||
<Button>
|
||||
<Button data-test="site-new-page-btn">
|
||||
<Plus className="mr-2 h-4 w-4" />
|
||||
Neue Seite
|
||||
</Button>
|
||||
|
||||
@@ -38,7 +38,7 @@ export default async function PostsManagerPage({ params }: Props) {
|
||||
>
|
||||
<div className="space-y-6">
|
||||
<div className="flex justify-end">
|
||||
<Button>
|
||||
<Button data-test="site-new-post-btn">
|
||||
<Plus className="mr-2 h-4 w-4" />
|
||||
Neuer Beitrag
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user