diff --git a/app/(admin)/admin/static-page/page.tsx b/app/(admin)/admin/static-page/page.tsx new file mode 100644 index 0000000..cd7c356 --- /dev/null +++ b/app/(admin)/admin/static-page/page.tsx @@ -0,0 +1,10 @@ +import StaticPageBuilder from "@/components/main/static-page/static-page-main"; +import { Card } from "@nextui-org/react"; + +export default function StaticPageGenerator() { + return ( + + + + ); +} diff --git a/components/layout/sidebar/sidebar.tsx b/components/layout/sidebar/sidebar.tsx index bac6000..5113728 100644 --- a/components/layout/sidebar/sidebar.tsx +++ b/components/layout/sidebar/sidebar.tsx @@ -107,6 +107,20 @@ const sideBarDummyData = [ statusName: "Active", childModule: null, }, + { + id: 11, + name: "Static Page", + moduleId: 652, + moduleName: "Dashboard", + modulePathUrl: "/admin/static-page", + parentId: -1, + icon: , + position: 1, + statusId: 1, + childMenu: [], + statusName: "Active", + childModule: null, + }, // { // id: 4, // name: "E-Magazine", diff --git a/components/main/static-page/static-page-main.tsx b/components/main/static-page/static-page-main.tsx new file mode 100644 index 0000000..a80311b --- /dev/null +++ b/components/main/static-page/static-page-main.tsx @@ -0,0 +1,47 @@ +"use client"; +import { Textarea } from "@nextui-org/input"; +import { Card } from "@nextui-org/react"; +import { useCallback, useState } from "react"; +import DOMPurify from "dompurify"; +import Script from "next/script"; + +export default function StaticPageBuilder() { + const [content, setContent] = useState(""); + + const generatedPage = useCallback(() => { + const sanitizedContent = DOMPurify.sanitize(content); + return ( + +
+ + ); + }, [content]); + + return ( +
+
+ Editor +