From 6560302c83c9a7f2ff454e1c271f99ca83735d5f Mon Sep 17 00:00:00 2001 From: Neeraj Rekwar <88387699+neerajrekwar@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:28:06 +0000 Subject: [PATCH] fda --- app/about/book-meeting/page.tsx | 29 ++++++++++------------------- components/Book.tsx | 25 +++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 19 deletions(-) create mode 100644 components/Book.tsx diff --git a/app/about/book-meeting/page.tsx b/app/about/book-meeting/page.tsx index 3d1629a88..72c519d3d 100644 --- a/app/about/book-meeting/page.tsx +++ b/app/about/book-meeting/page.tsx @@ -1,31 +1,22 @@ -"use client"; + +import CalendlyWidget from "@/components/Book"; import { Metadata } from "next"; -import { useEffect } from "react"; + export const metadata: Metadata = { title: "Book meeting", description: "Let's make together.", }; -const CalendlyWidget = () => { - useEffect(() => { - const script = document.createElement("script"); - script.src = "https://assets.calendly.com/assets/external/widget.js"; - script.async = true; - document.body.appendChild(script); - - return () => { - document.body.removeChild(script); - }; - }, []); - +const book = () => { + + return (
+ + > ); }; -export default CalendlyWidget; + +export default book \ No newline at end of file diff --git a/components/Book.tsx b/components/Book.tsx new file mode 100644 index 000000000..7b4cf5dbb --- /dev/null +++ b/components/Book.tsx @@ -0,0 +1,25 @@ + +'use client' +import { useEffect } from "react"; +const CalendlyWidget = () => { + useEffect(() => { + const script = document.createElement("script"); + script.src = "https://assets.calendly.com/assets/external/widget.js"; + script.async = true; + document.body.appendChild(script); + + return () => { + document.body.removeChild(script); + }; + }, []); + + return ( +
+ ); +}; + +export default CalendlyWidget;