From 7488cabf1d186ddc9dbcaaa1139d7916843b39f9 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Fri, 26 May 2023 19:22:14 +0100 Subject: [PATCH] setting up demo data, moved portfolios --- src/app/components/home/ModelSubmit.tsx | 35 --------------- src/app/portfolio/[slug]/page.jsx | 59 +++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 35 deletions(-) delete mode 100644 src/app/components/home/ModelSubmit.tsx diff --git a/src/app/components/home/ModelSubmit.tsx b/src/app/components/home/ModelSubmit.tsx deleted file mode 100644 index 12ac583a..00000000 --- a/src/app/components/home/ModelSubmit.tsx +++ /dev/null @@ -1,35 +0,0 @@ -import { useRouter } from "next/navigation"; - -const ModalSubmit = ({ - buttonDisabled, - budget, - objective, -}: { - buttonDisabled: boolean; - budget: string; - objective: string; -}) => { - const router = useRouter(); - function createPortfolio() { - // TODO: This will be a server action that will create a new portfolio in the database - // That endpoint will return a uuid which will be the new portfolio's id - const id = "f290f1ee-6c54-4b01-90e6-d701748f0851"; - - router.push( - `/portfolio/${id}?name=${name}&budget=${budget}&objective=${objective}` - ); - } - - return ( - - ); -}; - -export default ModalSubmit; diff --git a/src/app/portfolio/[slug]/page.jsx b/src/app/portfolio/[slug]/page.jsx index f2fa2746..be7d5785 100644 --- a/src/app/portfolio/[slug]/page.jsx +++ b/src/app/portfolio/[slug]/page.jsx @@ -1,3 +1,62 @@ export default function Page() { + // This is temp until we retrieve this data from the frontend + // TODO: Update the objects to contains objective + any other required information + const Portfolios = [ + { + id: "f290f1ee-6c54-4b01-90e6-d701748f0851", + }, + { + id: "d290f1ee-6c54-4b01-90e6-d701748f0851", + title: "Portfolio 1", + budget: "£500k", + }, + { + id: "d290f1ee-6c54-4b01-90e6-d701748f0852", + title: "Portfolio 2", + budget: "150k", + }, + { + id: "d290f1ee-6c54-4b01-90e6-d701748f0853", + title: "Portfolio 3", + budget: "£1m", + }, + { + id: "d290f1ee-6c54-4b01-90e6-d701748f0854", + title: "Portfolio 4", + budget: "£2m", + }, + { + id: "d290f1ee-6c54-4b01-90e6-d701748f0855", + title: "Portfolio 5", + budget: "£25k", + }, + { + id: "d290f1ee-6c54-4b01-90e6-d701748f0856", + title: "Portfolio 6", + budget: "£10k", + }, + { + id: "d290f1ee-6c54-4b01-90e6-d701748f0857", + title: "Portfolio 7", + budget: "£33k", + }, + { + id: "d290f1ee-6c54-4b01-90e6-d701748f0858", + title: "Portfolio 8", + budget: "£670k", + }, + { + id: "d290f1ee-6c54-4b01-90e6-d701748f0859", + title: "Portfolio 9", + budget: "£240k", + }, + { + id: "d290f1ee-6c54-4b01-90e6-d701748f0860", + title: "Portfolio 10", + budget: "93k", + }, + ]; + const demo_id = "f290f1ee-6c54-4b01-90e6-d701748f0851"; + return

Hello world

; }