Skip to content

Commit 35934d2

Browse files
Francisca105nalves599
authored andcommitted
Added to the Company page navigation links to venue
1 parent d5d638f commit 35934d2

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

src/app/(authenticated)/companies/[id]/page.tsx

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ export default async function Company({ params }: { params: CompanyParams }) {
3333
}
3434

3535
const companySessions = company.sessions?.sort((a, b) =>
36-
a.date.localeCompare(b.date),
36+
a.date.localeCompare(b.date)
3737
);
3838
const companyMembers = company.members?.sort((a, b) =>
39-
a.name.localeCompare(b.name),
39+
a.name.localeCompare(b.name)
4040
);
4141
const companyStands = company.stands?.sort((a, b) =>
42-
a.date.localeCompare(b.date),
42+
a.date.localeCompare(b.date)
4343
);
4444
const hereToday = isHereToday(company);
4545

@@ -88,7 +88,12 @@ export default async function Company({ params }: { params: CompanyParams }) {
8888
description="When we will be at SINFO"
8989
>
9090
{companyStands.map((s) => (
91-
<EventDayButton key={s.date} date={s.date} selected={true} />
91+
<Link
92+
key={s.date}
93+
href={`/venue?day=${s.date.split("T")[0]}&company=${companyID}`}
94+
>
95+
<EventDayButton date={s.date} selected={true} disabled={false} />
96+
</Link>
9297
))}
9398
</GridList>
9499
) : (

src/components/EventDayButton.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,21 @@ interface EventDayButtonProps {
99
date: string;
1010
onClick?: () => void;
1111
selected?: boolean;
12+
disabled?: boolean;
1213
}
1314

1415
export default function EventDayButton({
1516
date,
1617
onClick,
1718
selected = false,
19+
disabled = false,
1820
}: EventDayButtonProps) {
1921
return (
2022
<button
2123
className="flex flex-col items-center text-center gap-y-1 py-1"
2224
title={getEventFullDate(date)}
2325
onClick={onClick}
24-
disabled={!onClick}
26+
disabled={disabled}
2527
>
2628
<span
2729
className={`flex items-center justify-center font-mono rounded-full w-10 h-10 shadow-md focus:shadow-none ${selected ? "text-sinfo-primary outline outline-sinfo-primary hover:bg-slate-50" : "text-white bg-sinfo-primary"}`}

0 commit comments

Comments
 (0)