Skip to content

Commit

Permalink
Merge pull request #1 from pranav-deshmukh/master
Browse files Browse the repository at this point in the history
feat: view idea modal
  • Loading branch information
Abh1noob authored Mar 6, 2024
2 parents 6cb7bee + cb16e75 commit ddd9fd2
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 1 deletion.
3 changes: 2 additions & 1 deletion devsoc24-portal-fe/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ export default function HomePage() {
];
const ideaCard = [{
text: "Submit An Idea",
showModal: false,
showModal: true,
modalType:"IdeaSubmit",
routeTo: "/submit-idea",
}]
const router = useRouter();
Expand Down
2 changes: 2 additions & 0 deletions devsoc24-portal-fe/src/components/customCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,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 Image from "next/image";
import { Button } from "@/components/ui/button";
import { useState } from "react";
Expand Down Expand Up @@ -51,6 +52,7 @@ function CustomCard(props: CardProps) {
)}
{showModal === "JoinTeam" && <JoinTeam />}
{showModal === "CreateTeam" && <CreateTeam />}
{showModal === "IdeaSubmit" && <IdeaSubmission />}
</Dialog>
</div>
</div>
Expand Down
86 changes: 86 additions & 0 deletions devsoc24-portal-fe/src/components/submission/submission.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
import {
DialogContent,
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog";
import { Label } from "@/components/ui/label";


const projectTracks = [
{ id: "track1", name: "Track 1" },
{ id: "track2", name: "Track 2" },
{ id: "track3", name: "Track 3" },
{ id: "track4", name: "Track 4" },
];

const projectInfo = {
projectName: "lorem ipsum",
projectTrack: "jndcjskdcnsjck",
description: "This is a detailed description of the project",
figmaLink: "https://www.figma.com/",
githubLink: "https://www.github.com/",
otherLinks: "https://www.otherlink.com",
};

function Submission() {
return (
<>
<DialogContent className="sm:max-w-[425px]">
<DialogHeader>
<DialogTitle>View Submission</DialogTitle>
</DialogHeader>
<div className="overflow-y-auto max-h-[80vh]"> {/* Scrollable container */}
<div className="flex flex-col gap-y-2 py-3 text-[#0019FF]">
<Label htmlFor="projectName" className="text-xs font-semibold">
Project Name
</Label>
<div id="projectName" className="p-2 rounded-md bg-[#F1F1F1] text-[#ABAFB1]">
{projectInfo.projectName}
</div>

<Label htmlFor="projectTrack" className="text-xs font-semibold">
Project Track
</Label>
<div id="projectTrack" className="p-2 rounded-md bg-[#F1F1F1] text-[#ABAFB1]">
{projectTracks.find(track => track.id === projectInfo.projectTrack)?.name ?? "Track not found"}
</div>

<Label htmlFor="description" className="text-xs font-semibold">
Description of project
</Label>
<div
id="description"
className="p-2 rounded-md bg-[#F1F1F1] text-[#ABAFB1]"
style={{ minHeight: '100px' }}
>
{projectInfo.description}
</div>

<Label htmlFor="figmaLink" className="text-xs font-semibold">
Figma Link
</Label>
<div id="figmaLink" className="p-2 rounded-md bg-[#F1F1F1] text-[#ABAFB1]">
{projectInfo.figmaLink}
</div>

<Label htmlFor="githubLink" className="text-xs font-semibold">
Github Link
</Label>
<div id="githubLink" className="p-2 rounded-md bg-[#F1F1F1] text-[#ABAFB1]">
{projectInfo.githubLink}
</div>

<Label htmlFor="otherLinks" className="text-xs font-semibold">
Other Links
</Label>
<div id="otherLinks" className="p-2 rounded-md bg-[#F1F1F1] text-[#ABAFB1]">
{projectInfo.otherLinks}
</div>
</div>
</div>
</DialogContent>
</>
);
}

export default Submission;

0 comments on commit ddd9fd2

Please sign in to comment.