diff --git a/devsoc24-portal-fe/src/app/home/page.tsx b/devsoc24-portal-fe/src/app/home/page.tsx index 3cc419d..5458b16 100644 --- a/devsoc24-portal-fe/src/app/home/page.tsx +++ b/devsoc24-portal-fe/src/app/home/page.tsx @@ -138,7 +138,7 @@ export default function HomePage() { const fetchIdea = async () => { try { const response: AxiosResponse = await axios.get( - `${process.env.NEXT_PUBLIC_API_URL}/idea`, + `${process.env.NEXT_PUBLIC_API_URL}/project`, { withCredentials: true, }, @@ -240,32 +240,40 @@ export default function HomePage() { ]; const ideaTherecard = [ { - text: "View Idea", + text: "View Project", showModal: true, modalType: "IdeaSubmit", }, { - text: "Edit idea", + text: "Edit Project", showModal: false, modalType: "EditIdea", - routeTo: "/edit-idea", + routeTo: "/edit-project", }, ]; const ideaCard = [ { - text: "Submit an Idea", - showModal: true, + text: "Submit A Project", + showModal: getIdea !== "idea found" && getIdea !== "", modalType: "Choice", + routeTo: "/submit-project", }, ]; const notLeader = [ { - text: "View Idea", + text: "View Project", showModal: true, modalType: "IdeaSubmit", }, ]; + const ideaView = [ + { + text: "View Idea", + showModal: true, + modalType: "IdeaView", + }, + ]; return ( <> @@ -395,14 +403,14 @@ export default function HomePage() { <> )} -
+
{showModal === "leave" && } {showModal === "kick" && }
-
+
{team ? ( )} - +
+ + +
+
diff --git a/devsoc24-portal-fe/src/components/customCard.tsx b/devsoc24-portal-fe/src/components/customCard.tsx index e94bd7b..84f295f 100644 --- a/devsoc24-portal-fe/src/components/customCard.tsx +++ b/devsoc24-portal-fe/src/components/customCard.tsx @@ -3,6 +3,7 @@ import { Dialog, DialogTrigger } from "@/components/ui/dialog"; import { type CardProps } from "@/interfaces"; import JoinTeam from "@/components/team/joinTeam"; import IdeaSubmission from "@/components/submission/submission"; +import IdeaSubmission2 from "@/components/submission/submission2"; import Image from "next/image"; import { Button } from "@/components/ui/button"; import { useState } from "react"; @@ -63,6 +64,7 @@ function CustomCard(props: CardProps) { {showModal === "JoinTeam" && } {showModal === "CreateTeam" && } {showModal === "IdeaSubmit" && } + {showModal === "IdeaView" && }
diff --git a/devsoc24-portal-fe/src/components/submission/submission.tsx b/devsoc24-portal-fe/src/components/submission/submission.tsx index 0fca2c8..3c53461 100644 --- a/devsoc24-portal-fe/src/components/submission/submission.tsx +++ b/devsoc24-portal-fe/src/components/submission/submission.tsx @@ -8,7 +8,7 @@ import axios from "axios"; import { useEffect, useState } from "react"; interface FormValues { - title: string; + name: string; track: string; description: string; figma_link?: string; @@ -28,7 +28,7 @@ function Submission() { async function getIdeaSubmission() { try { const res = await axios.get( - `${process.env.NEXT_PUBLIC_API_URL}/idea`, + `${process.env.NEXT_PUBLIC_API_URL}/project`, { withCredentials: true, }, @@ -58,9 +58,9 @@ function Submission() { id="projectName" className="rounded-md bg-[#F1F1F1] p-2 text-[#ABAFB1]" > - {!ideaDetails?.title || ideaDetails?.title === "" + {!ideaDetails?.name || ideaDetails?.name === "" ? viewStatus - : ideaDetails?.title} + : ideaDetails?.name}