Skip to content

Commit

Permalink
fix: slice simulator
Browse files Browse the repository at this point in the history
  • Loading branch information
juliankoehn committed Feb 14, 2025
1 parent 1357789 commit 6b0f0f5
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 3 deletions.
7 changes: 7 additions & 0 deletions src/app/slice-simulator/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function Layout({ children }: { children: React.ReactNode }) {
return (
<html lang="de">
<body>{children}</body>
</html>
);
}
21 changes: 21 additions & 0 deletions src/app/slice-simulator/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import {
SliceSimulator,
type SliceSimulatorParams,
getSlices,
} from "@slicemachine/adapter-next/simulator";
import { SliceZone } from "@prismicio/react";

import { components } from "../../slices";

export default async function SliceSimulatorPage({
searchParams,
}: SliceSimulatorParams) {
const { state } = await searchParams;
const slices = getSlices(state);

return (
<SliceSimulator>
<SliceZone slices={slices} components={components} />
</SliceSimulator>
);
}
2 changes: 1 addition & 1 deletion src/middleware.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ export const config = {
* Match all requests paths except for the onse starting with
* - api (API routes)
*/
"/((?!api|_next/static|_next/image|favicon.ico|sitemap*|robots.txt|logo.svg).*)",
"/((?!api|_next/static|_next/image|favicon.ico|sitemap*|robots.txt|slice-simulator|logo.svg).*)",
],
};
39 changes: 37 additions & 2 deletions src/slices/TextContent/mocks.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,46 @@
"content": {
"__TYPE__": "StructuredTextContent",
"value": [
{
"type": "heading2",
"content": {
"text": "Warum eine strategische Reihenfolge bei Zertifizierungen entscheidend ist",
"spans": []
},
"direction": "ltr"
},
{
"type": "paragraph",
"content": {
"text": "Viele Unternehmen stehen vor der Herausforderung, mehrere Zertifizierungen in Qualitätsmanagement, IT-Sicherheit, Umwelt- und Arbeitsschutz umzusetzen. Eine durchdachte Reihenfolge hilft, Kosten und Zeit zu sparen, doppelte Arbeit zu vermeiden und Synergien zwischen den Standards zu nutzen.",
"spans": [
{
"type": "strong",
"start": 78,
"end": 139
},
{
"type": "strong",
"start": 188,
"end": 290
}
]
},
"direction": "ltr"
},
{
"type": "paragraph",
"content": {
"text": "Nisi sunt incididunt enim."
}
"text": "Diese Roadmap zeigt, welche Zertifizierungen in welcher Reihenfolge sinnvoll sind, ergänzt um Fallbeispiele aus der Praxis.",
"spans": [
{
"type": "strong",
"start": 94,
"end": 122
}
]
},
"direction": "ltr"
}
]
}
Expand Down

0 comments on commit 6b0f0f5

Please sign in to comment.