Skip to content

Commit

Permalink
feat: ui improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Pratham-Mishra04 committed Jun 7, 2023
1 parent cf8fc7a commit 7a96a36
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 3 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "yantra",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"dev": "next dev",
"build": "next build",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const CommentEdit = ({ comment, setComment, score, setScore }: Props) => {
<div className="font-ibmMono font-extrabold text-lg flex gap-2">
<div> Score: </div>
<input
className="text-black w-1/2"
className="text-black w-fit px-2 focus:outline-none rounded-lg"
type="number"
value={score}
onChange={(el) => {
Expand Down
18 changes: 17 additions & 1 deletion src/sections/admin-page-sections/admin-view-submission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ const ViewSubmission = ({ id }: ViewSubmissionProps) => {
const [loading, setLoading] = useState(true);
const router = useRouter();

const getTrack = (index: number) => {
if (index == 1) return 'GOOD HEALTH AND WELL BEING';
else if (index == 2) return 'QUALITY EDUCATION';
else if (index == 3) return 'INDUSTRY, INNOVATION AND INFRASTRUCTURE';
else if (index == 4) return 'REDUCED INEQUALITIES';
else if (index == 5) return 'SUSTAINABLE CITIES AND COMMUNITIES';
else if (index == 6) return 'RESPONSIBLE CONSUMPTION AND PRODUCTION';
else '';
};

return (
<>
<div className="h-full w-full flex flex-col justify-end items-center">
Expand All @@ -58,7 +68,13 @@ const ViewSubmission = ({ id }: ViewSubmissionProps) => {
Project Track
</p>
</div>
<div>{submission?.track}</div>
<div>
{getTrack(
submission?.track
? Number(submission?.track)
: 0
)}
</div>
<div className="text-sm flex justify-start gap-2 items-center pt-4">
<p className="font-spaceGrotesk text-white opacity-[0.4]">
Project Links
Expand Down
19 changes: 18 additions & 1 deletion src/sections/sdg-view-team-page-sections/view-submission.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,16 @@ const ViewSubmission = ({ toggleEdit }: ViewSubmissionProps) => {
}
};

const getTrack = (index: number) => {
if (index == 1) return 'GOOD HEALTH AND WELL BEING';
else if (index == 2) return 'QUALITY EDUCATION';
else if (index == 3) return 'INDUSTRY, INNOVATION AND INFRASTRUCTURE';
else if (index == 4) return 'REDUCED INEQUALITIES';
else if (index == 5) return 'SUSTAINABLE CITIES AND COMMUNITIES';
else if (index == 6) return 'RESPONSIBLE CONSUMPTION AND PRODUCTION';
else '';
};

return (
<>
<div className="h-full w-full flex justify-around items-center">
Expand Down Expand Up @@ -88,7 +98,14 @@ const ViewSubmission = ({ toggleEdit }: ViewSubmissionProps) => {
Track
</p>
</div>
<div>{submission?.track}</div>
<div>
{' '}
{getTrack(
submission?.track
? Number(submission?.track)
: 0
)}
</div>
<div className="text-sm flex justify-start gap-2 items-center pt-4">
<p className="font-spaceGrotesk text-white opacity-[0.4]">
Links
Expand Down

0 comments on commit 7a96a36

Please sign in to comment.