From 0f619ccb7d6c11fb60183d6f2c21b5afe2d0dcd5 Mon Sep 17 00:00:00 2001 From: Hamzat Victor Date: Tue, 24 Sep 2024 14:10:56 +0100 Subject: [PATCH] feat: update project icon for each template type --- frontend/components/dashboard/newProject.tsx | 40 +------------------ .../dashboard/projectCard/index.tsx | 16 +++----- frontend/lib/data/index.ts | 36 +++++++++++++++++ 3 files changed, 43 insertions(+), 49 deletions(-) create mode 100644 frontend/lib/data/index.ts diff --git a/frontend/components/dashboard/newProject.tsx b/frontend/components/dashboard/newProject.tsx index 2dc248d..334d232 100644 --- a/frontend/components/dashboard/newProject.tsx +++ b/frontend/components/dashboard/newProject.tsx @@ -36,43 +36,7 @@ import { createSandbox } from "@/lib/actions" import { useRouter } from "next/navigation" import { Loader2 } from "lucide-react" import { Button } from "../ui/button" - -const data: { - id: string - name: string - icon: string - description: string - disabled: boolean -}[] = [ - { - id: "reactjs", - name: "React", - icon: "/project-icons/react.svg", - description: "A JavaScript library for building user interfaces", - disabled: false, - }, - { - id: "vanillajs", - name: "HTML/JS", - icon: "/project-icons/more.svg", - description: "More coming soon, feel free to contribute on GitHub", - disabled: false, - }, - { - id: "nextjs", - name: "NextJS", - icon: "/project-icons/node.svg", - description: "A JavaScript runtime built on the V8 JavaScript engine", - disabled: false, - }, - { - id: "streamlit", - name: "Streamlit", - icon: "/project-icons/python.svg", - description: "A JavaScript runtime built on the V8 JavaScript engine", - disabled: false, - }, -] +import { projectTemplates } from "@/lib/data" const formSchema = z.object({ name: z @@ -129,7 +93,7 @@ export default function NewProjectModal({ Create A Sandbox
- {data.map((item) => ( + {projectTemplates.map((item) => (