-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into enhancement/smart-con…
…tract
- Loading branch information
Showing
6 changed files
with
129 additions
and
6 deletions.
There are no files selected for viewing
61 changes: 61 additions & 0 deletions
61
frontend/src/app/dashboard/create-election/_components/Summary.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
import React from "react"; | ||
import InputWrapper from "./inputs/InputWrapper"; | ||
|
||
const items = [ | ||
{ | ||
title: "Election Title", | ||
values: ["2024 SRC President - UG"], | ||
}, | ||
{ | ||
title: "Description", | ||
values: [ | ||
"This election is being held to elect a new SRC president for the University of Ghana", | ||
], | ||
}, | ||
{ | ||
title: "Election Period", | ||
values: ["Aug 17, 2024 - Aug 29, 2024"], | ||
}, | ||
{ | ||
title: "Election Type", | ||
values: ["Private"], | ||
}, | ||
{ | ||
title: "Candidates", | ||
values: [ | ||
"Joshua Mensah", | ||
"Alisson Newton", | ||
"James Hammond", | ||
"Michael Brown", | ||
], | ||
}, | ||
{ | ||
title: "Voter Count", | ||
values: ["24"], | ||
}, | ||
]; | ||
|
||
const Summary = () => { | ||
return ( | ||
<div className="w-full flex flex-col gap-12"> | ||
{items.map((item, index) => ( | ||
<InputWrapper key={index} label={item.title} name={item.title}> | ||
<div className="flex flex-col gap-2"> | ||
{item.values.map((value, index) => ( | ||
<p key={index} className="text-white/40 text-lg"> | ||
{value} | ||
</p> | ||
))} | ||
</div> | ||
</InputWrapper> | ||
))} | ||
<div className="flex justify-end mt-24"> | ||
<button className="bg-secondary dark:bg-primary rounded-full px-12 text-white py-2.5"> | ||
Next | ||
</button> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Summary; |
42 changes: 41 additions & 1 deletion
42
frontend/src/app/dashboard/create-election/_components/Voters.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,47 @@ | ||
import { | ||
Accordion, | ||
AccordionItem, | ||
AccordionTrigger, | ||
AccordionContent, | ||
} from "@/components/ui/accordion"; | ||
import React from "react"; | ||
|
||
const Voters = () => { | ||
return <div className="w-full">Voters</div>; | ||
return ( | ||
<Accordion value="voters" type="single" className="flex flex-col text-base"> | ||
<AccordionItem value="voters" className="border-none"> | ||
<AccordionTrigger className="bg-primary py-3 px-[18px] rounded-t-xl text-white/60"> | ||
Enter Voters Manually | ||
</AccordionTrigger> | ||
<AccordionContent> | ||
<form className="flex flex-col gap-6 pt-[42px] pb-12"> | ||
<textarea | ||
className="border border-[#EAEAEA]/30 focus:border-primary outline-none rounded-lg p-4 resize-none bg-transparent" | ||
rows={12} | ||
placeholder="Enter addresses here" | ||
></textarea> | ||
|
||
<div className="flex justify-between gap-2 items-center"> | ||
<label | ||
htmlFor="voters" | ||
className="text-secondary italic font-mulish" | ||
> | ||
Enter each Voter’s wallet address on a new line | ||
</label> | ||
|
||
<p className="text-white/60">O Voter(s)</p> | ||
</div> | ||
|
||
<div className="flex justify-end"> | ||
<button className="bg-secondary dark:bg-primary rounded-full px-12 text-white py-2.5 mt-24"> | ||
Next | ||
</button> | ||
</div> | ||
</form> | ||
</AccordionContent> | ||
</AccordionItem> | ||
</Accordion> | ||
); | ||
}; | ||
|
||
export default Voters; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters