Skip to content

Commit

Permalink
Merge branch 'duptala/events-page/124' of https://github.com/UoaWDCC/…
Browse files Browse the repository at this point in the history
…auis-portal into duptala/events-page/124
  • Loading branch information
duptala committed Jul 11, 2024
2 parents 44e6ac1 + d862349 commit 827fbf0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion web/src/components/PastEventCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ interface PastEventCardProps {

const PastEventCard: React.FC<PastEventCardProps> = ({ pastEvent }) => {
return (
<div className="card flex h-full w-full flex-col rounded-3xl bg-white shadow-md md:flex-row hover:bg-black/5 duration-100">
<div className="card flex h-full w-full flex-col rounded-3xl bg-white shadow-md duration-100 hover:bg-black/5 md:flex-row">
<img
src={pastEvent.image}
alt={pastEvent.title}
Expand Down
42 changes: 21 additions & 21 deletions web/src/components/SimpleSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,38 +55,38 @@ const SimpleSlider: React.FC<SimpleSliderProps> = ({ children, cardType }) => {
<div className="flex w-full items-center justify-center">
<IoArrowBackCircleOutline
onClick={previous}
className="mx-4 hidden h-16 w-16 sm:flex text-gray-400 hover:cursor-pointer"
className="mx-4 hidden h-16 w-16 text-gray-400 hover:cursor-pointer sm:flex"
/>
<div className="h-auto w-full sm:w-[calc(100%-8rem)]">
<Slider ref={sliderRef} {...settings}>
{cardType === "past"
? React.Children.toArray(children)
.reduce((acc: any, child: any, index: number) => {
if (index % 3 === 0) acc.push([]);
acc[acc.length - 1].push(child);
return acc;
}, [])
.map((group: any, index: number) => (
<div key={index} className="p-2">
<div className="flex flex-col">
{group.map((child: any, subIndex: number) => (
<div key={subIndex} className="p-2">
{child}
</div>
))}
.reduce((acc: any, child: any, index: number) => {
if (index % 3 === 0) acc.push([]);
acc[acc.length - 1].push(child);
return acc;
}, [])
.map((group: any, index: number) => (
<div key={index} className="p-2">
<div className="flex flex-col">
{group.map((child: any, subIndex: number) => (
<div key={subIndex} className="p-2">
{child}
</div>
))}
</div>
</div>
</div>
))
))
: React.Children.map(children, (child, index) => (
<div key={index} className="p-2">
{child}
</div>
))}
<div key={index} className="p-2">
{child}
</div>
))}
</Slider>
</div>
<IoArrowForwardCircleOutline
onClick={next}
className="mx-4 hidden h-16 w-16 sm:flex text-gray-400 hover:cursor-pointer"
className="mx-4 hidden h-16 w-16 text-gray-400 hover:cursor-pointer sm:flex"
/>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/UpcomingEventCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const UpcomingEventCard: React.FC<UpcomingEventCardProps> = ({
timeUntilEvent = `${differenceInMinutes} minute${differenceInMinutes > 1 ? "s" : ""}`;
}
return (
<div className="card relative h-full w-full rounded-lg bg-white shadow-md hover:bg-white/80 duration-100">
<div className="card relative h-full w-full rounded-lg bg-white shadow-md duration-100 hover:bg-white/80">
<div className="absolute right-2 top-2 z-10 rounded-full bg-orange-500 px-3 py-1 text-base font-bold text-white shadow-sm">
in {timeUntilEvent}
</div>
Expand Down

0 comments on commit 827fbf0

Please sign in to comment.