generated from UoaWDCC/react-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2146969
commit 416ff05
Showing
7 changed files
with
127 additions
and
87 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
web/src/components/Dashboard/DashboardDiscover/DashboardDiscover.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
56 changes: 28 additions & 28 deletions
56
web/src/components/Dashboard/DashboardDiscover/EventsScrollContainer.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,35 +1,35 @@ | ||
import { Dispatch, SetStateAction } from "react"; | ||
import Event from "../dashboardDiscover/Event.tsx" | ||
import Event from "../DashboardDiscover/Event.tsx"; | ||
|
||
type Event = { | ||
event_title: string; | ||
description: string; | ||
tasks: string; | ||
notes: string; | ||
contact: string; | ||
tag: string[]; | ||
start_date_time: Date; | ||
end_date_time: Date; | ||
location: string; | ||
image: string; | ||
host: string; | ||
coordinates: {longitude: string, latitude: string}; | ||
} | ||
event_title: string; | ||
description: string; | ||
tasks: string; | ||
notes: string; | ||
contact: string; | ||
tag: string[]; | ||
start_date_time: Date; | ||
end_date_time: Date; | ||
location: string; | ||
image: string; | ||
host: string; | ||
coordinates: { longitude: string; latitude: string }; | ||
}; | ||
|
||
interface EventsProps { | ||
events: Event[]; | ||
setEventDetails: Dispatch<SetStateAction<null|Event>>; | ||
events: Event[]; | ||
setEventDetails: Dispatch<SetStateAction<null | Event>>; | ||
} | ||
|
||
export default function EventsScrollContainer({events, setEventDetails}: EventsProps) { | ||
return ( | ||
<div className="dashboard bg-white-background h-[43vh] overflow-y-scroll"> | ||
{events.map((e, index) => ( | ||
<Event key={index} event={e} setEventDetails={setEventDetails}/> | ||
)) | ||
} | ||
|
||
</div> | ||
) | ||
} | ||
export default function EventsScrollContainer({ | ||
events, | ||
setEventDetails, | ||
}: EventsProps) { | ||
return ( | ||
<div className="dashboard bg-white-background h-[43vh] overflow-y-scroll"> | ||
{events.map((e, index) => ( | ||
<Event key={index} event={e} setEventDetails={setEventDetails} /> | ||
))} | ||
</div> | ||
); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
interface LeaderboardEntryProps { | ||
rank: number; | ||
img: string; | ||
name: string; | ||
hours: number; | ||
} | ||
|
||
function LeaderboardEntry({rank, img, fname, lname, hours }: any) { | ||
function LeaderboardEntry({ rank, img, fname, lname, hours }: any) { | ||
return ( | ||
<div className="w-full mb-5 bg-white flex flex-row items-center"> | ||
<p className="w-[10%] text-detail text-primary-dark text-center">{rank}</p> | ||
<div className="w-[80%] flex flex-row items-center justify-start pl-[12%]"> | ||
<img src={img} alt="profile" className="object-cover w-[30px] h-[30px] rounded-full mt-[-15px] mr-2" /> | ||
<p className="text-[9pt] truncate">{fname} {lname}</p> | ||
</div> | ||
{hours ? <p className="w-[10%] text-[9pt] text-primary text-center">{hours}</p> : <p className="w-[10%] text-[9pt] text-primary text-center">0</p>} | ||
<p className="w-[10%] text-detail text-primary-dark text-center"> | ||
{rank} | ||
</p> | ||
<div className="w-[80%] flex flex-row items-center justify-start pl-[12%]"> | ||
<img | ||
src={img} | ||
alt="profile" | ||
className="object-cover w-[30px] h-[30px] rounded-full mt-[-15px] mr-2" | ||
/> | ||
<p className="text-[9pt] truncate"> | ||
{fname} {lname} | ||
</p> | ||
</div> | ||
{hours ? ( | ||
<p className="w-[10%] text-[9pt] text-primary text-center">{hours}</p> | ||
) : ( | ||
<p className="w-[10%] text-[9pt] text-primary text-center">0</p> | ||
)} | ||
</div> | ||
); | ||
} | ||
|
||
export default LeaderboardEntry; | ||
export default LeaderboardEntry; |
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