diff --git a/apps/web/app/(canvas)/canvas/page.tsx b/apps/web/app/(canvas)/canvas/page.tsx deleted file mode 100644 index 0bf30d89..00000000 --- a/apps/web/app/(canvas)/canvas/page.tsx +++ /dev/null @@ -1,22 +0,0 @@ -import React from "react"; -import { getCanvas } from "@/app/actions/fetchers"; -import SearchandCreate from "./search&create"; -import ThinkPads from "./thinkPads"; - -async function page() { - const canvas = await getCanvas(); - return ( -
-
-

Your thinkpads

- - { - // @ts-ignore - canvas.success && - } -
-
- ); -} - -export default page; diff --git a/apps/web/app/(canvas)/canvas/search&create.tsx b/apps/web/app/(canvas)/canvas/search&create.tsx deleted file mode 100644 index ad64729e..00000000 --- a/apps/web/app/(canvas)/canvas/search&create.tsx +++ /dev/null @@ -1,45 +0,0 @@ -"use client"; - -import { useFormStatus } from "react-dom"; -import Image from "next/image"; -import { SearchIcon } from "@repo/ui/icons"; -import { createCanvas } from "@/app/actions/doers"; -import { toast } from "sonner"; - -export default function SearchandCreate() { - return ( -
-
- - -
- -
{ - const res = await createCanvas(); - if (!res.success) { - toast.warning(res.message, { - style: { backgroundColor: "rgb(22 31 42 / 0.3)" }, - }); - } - }} - > -
- ); -} - -function Button() { - const { pending } = useFormStatus(); - return ( - - ); -} diff --git a/apps/web/app/(canvas)/canvas/thinkPad.tsx b/apps/web/app/(canvas)/canvas/thinkPad.tsx deleted file mode 100644 index 4d31107d..00000000 --- a/apps/web/app/(canvas)/canvas/thinkPad.tsx +++ /dev/null @@ -1,276 +0,0 @@ -import { getCanvasData } from "@/app/actions/fetchers"; -import { AnimatePresence, motion } from "framer-motion"; -import Link from "next/link"; -import { - EllipsisHorizontalCircleIcon, - TrashIcon, - PencilSquareIcon, -} from "@heroicons/react/24/outline"; -import { toast } from "sonner"; -import { Label } from "@repo/ui/shadcn/label"; - -const childVariants = { - hidden: { opacity: 0, y: 10, filter: "blur(2px)" }, - visible: { opacity: 1, y: 0, filter: "blur(0px)" }, -}; - -export default function ThinkPad({ - title, - description, - image, - id, -}: { - title: string; - description: string; - image: string; - id: string; -}) { - const [deleted, setDeleted] = useState(false); - const [info, setInfo] = useState({ title, description }); - return ( - - {!deleted && ( - - - - Loading... - - } - > - - - -
- - {info.title} - - - {info.description} - -
- setDeleted(true)} - setInfo={(e) => setInfo(e)} - /> - - )} - - ); -} - -import { - Popover, - PopoverContent, - PopoverTrigger, -} from "@repo/ui/shadcn/popover"; - -function Menu({ - info, - id, - setDeleted, - setInfo, -}: { - info: { title: string; description: string }; - id: string; - setDeleted: () => void; - setInfo: ({ - title, - description, - }: { - title: string; - description: string; - }) => void; -}) { - return ( - - - - - - - - - - ); -} - -function EditToolbar({ - id, - setInfo, - info, -}: { - id: string; - setInfo: ({ - title, - description, - }: { - title: string; - description: string; - }) => void; - info: { - title: string; - description: string; - }; -}) { - const [open, setOpen] = useState(false); - return ( - - - - - -
{ - const data = { - title: FormData.get("title") as string, - description: FormData.get("description") as string, - }; - const res = await AddCanvasInfo({ id, ...data }); - if (res.success) { - setOpen(false); - setInfo(data); - } else { - setOpen(false); - toast.error("Something went wrong.", { - style: { backgroundColor: "rgb(22 31 42 / 0.3)" }, - }); - } - }} - > - - Edit Canvas - - Add Description to your canvas. Pro tip: Let AI do the job, as you - add your content into canvas, we will autogenerate your - description. - - -
-
- - -
-
- -