diff --git a/next/app/(main)/events/[slug]/page.tsx b/next/app/(main)/events/[slug]/page.tsx
new file mode 100644
index 0000000..72ff1e1
--- /dev/null
+++ b/next/app/(main)/events/[slug]/page.tsx
@@ -0,0 +1,329 @@
+import IconDownload from "@/assets/svg/IconDownload";
+import AudioFilePlayer from "@/components/AudioFilePlayer";
+import Button from "@/components/Button";
+import HoverText from "@/components/HoverText";
+import RenderTipTap from "@/components/RenderTipTap";
+import { Api } from "@/lib/api";
+import {
+ ItemsEvents,
+ ItemsPosts,
+ ItemsPostsDirectusUsers1,
+ ItemsPrograms,
+ Users,
+} from "@/lib/api/data-contracts";
+import Colors from "@/lib/Colors";
+import Fonts from "@/lib/Fonts";
+import Metrics from "@/lib/Metrics";
+import moment from "moment";
+import Image from "next/image";
+import { notFound } from "next/navigation";
+import { Text, View } from "@/lib/server-react-native";
+import StyleSheet from "react-native-media-query";
+import IconShare from "../../../../assets/svg/IconShare";
+import { logError } from "@/lib/loging";
+import DownloadLogo from "../../geschichte/DownloadLogo";
+
+const { ids, styles } = StyleSheet.create({
+ container: {
+ maxWidth: 1280,
+ width: "100%",
+ alignItems: "center",
+ alignSelf: "center",
+ },
+ imageContainer: {
+ width: "100%",
+ },
+ postContainer: {
+ width: "75%",
+ },
+ border: {
+ borderBlockColor: Colors.black,
+ borderRadius: 9,
+ borderWidth: 1,
+ alignSelf: "flex-start",
+ flexDirection: "row",
+ alignItems: "center",
+ paddingVertical: 3,
+ paddingHorizontal: 6,
+ },
+ title: {
+ ...Fonts.style.h1,
+ color: "white",
+ textAlign: "center",
+ paddingBottom: Metrics.doubleBaseMargin,
+ },
+ sendungsInfo: { ...Fonts.style.text, color: "black" },
+ image: { width: "100%", borderRadius: 9 },
+});
+
+async function getEvent(slug) {
+ try {
+ const itemResponse = await Api.readItemsEvents(
+ {
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
+ // @ts-ignore
+ filter: JSON.stringify({
+ slug: {
+ _eq: slug,
+ },
+ }),
+ fields: ["*", "logos.directus_files_id"],
+ },
+ {
+ next: {
+ tags:
+ process.env.NODE_ENV === "production" ? ["collection"] : undefined,
+ },
+ cache:
+ process.env.NODE_ENV === "production" ? "force-cache" : "no-store",
+ }
+ );
+ let item: ItemsEvents[] = itemResponse.data.data;
+ console.log("event", item);
+
+ return item[0];
+ } catch (error) {
+ logError(error);
+
+ notFound();
+ }
+}
+
+export default async function DynamicPage({ params }) {
+ const event = await getEvent(params.slug);
+
+ return (
+ {props.children},
- code: (props) => {props.children}
,
+const markHandlers = (topProps) => {
+ return {
+ link: (props) => {
+ // console.log("linkj props", props.children.props.node.type);
+ // console.log("linkj topProps", topProps);
+
+ let label =
+ props.children.props.node.type === "text"
+ ? props.children.props.node.text
+ : props.children;
+ return (
+
+ // setHover(true)}
+ // // onMouseLeave={() => setHover(false)}
+ // >
+ // {props.children}
+ //
+ );
+ },
+ bold: (props) => {props.children},
+ italic: (props) => {props.children},
+ underline: (props) => {props.children},
+ strike: (props) => {props.children},
+ code: (props) => {props.children}
,
+ };
};
const nodeHandlers: TipTapNodeHandlers = {
@@ -266,17 +307,19 @@ const nodeHandlers: TipTapNodeHandlers = {
},
};
-const handlers: TipTapRenderHandlers = {
- ...markHandlers,
- ...nodeHandlers,
+const handlers = (topProps) => {
+ return {
+ ...markHandlers(topProps),
+ ...nodeHandlers,
+ };
};
-export const RenderTipTap = ({ content }) => {
+export const RenderTipTap = ({ content, topProps }) => {
// const contentJson = useMemo(() => JSON.parse(content), [content]);
return (