diff --git a/apps/app/components/pages/create-update-block-inline.tsx b/apps/app/components/pages/create-update-block-inline.tsx index b5f36722f7..a44fa6932d 100644 --- a/apps/app/components/pages/create-update-block-inline.tsx +++ b/apps/app/components/pages/create-update-block-inline.tsx @@ -3,6 +3,8 @@ import dynamic from "next/dynamic"; import { mutate } from "swr"; +import { SparklesIcon } from "@heroicons/react/24/outline"; + // react-hook-form import { Controller, useForm } from "react-hook-form"; // services @@ -23,6 +25,9 @@ type Props = { data?: IPageBlock; setIsSyncing?: React.Dispatch>; focus?: keyof IPageBlock; + handelAutoGenerateDescription?: () => Promise; + iAmFeelingLucky?: boolean; + setGptAssistantModal: () => void; }; const defaultValues = { @@ -44,6 +49,9 @@ export const CreateUpdateBlockInline: React.FC = ({ data, setIsSyncing, focus, + handelAutoGenerateDescription, + setGptAssistantModal, + iAmFeelingLucky, }) => { const router = useRouter(); const { workspaceSlug, projectId, pageId } = router.query; @@ -185,6 +193,7 @@ export const CreateUpdateBlockInline: React.FC = ({ onJSONChange={(jsonValue) => setValue("description", jsonValue)} onHTMLChange={(htmlValue) => setValue("description_html", htmlValue)} placeholder="Description" + aria-hidden customClassName="text-sm" noBorder borderOnFocus={false} @@ -193,6 +202,37 @@ export const CreateUpdateBlockInline: React.FC = ({ />
+ { data && + <> + {console.log(handelAutoGenerateDescription, setGptAssistantModal, iAmFeelingLucky)} + + + + } Cancel {data diff --git a/apps/app/components/pages/single-page-block.tsx b/apps/app/components/pages/single-page-block.tsx index 4ab8e81edd..6b86b77fb1 100644 --- a/apps/app/components/pages/single-page-block.tsx +++ b/apps/app/components/pages/single-page-block.tsx @@ -303,6 +303,9 @@ export const SinglePageBlock: React.FC = ({ {...provided.dragHandleProps} > setGptAssistantModal((prev)=>!prev)} + iAmFeelingLucky={iAmFeelingLucky} handleClose={() => setCreateBlockForm(false)} data={block} setIsSyncing={setIsSyncing} diff --git a/apps/app/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx b/apps/app/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx index 6cecbba77b..ed32619715 100644 --- a/apps/app/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx +++ b/apps/app/pages/[workspaceSlug]/projects/[projectId]/pages/[pageId].tsx @@ -486,6 +486,7 @@ const SinglePage: NextPage = () => { setCreateBlockForm(false)} focus="name" + setGptAssistantModal={()=>{}} />
)}