Skip to content

Commit

Permalink
fix bug: session card does not fit the table cell
Browse files Browse the repository at this point in the history
  • Loading branch information
dada878 committed Feb 16, 2024
1 parent 53ba65a commit aab98e3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions components/website/SessionCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ export default function SessionCard({
: "justify-start";
}

function sessionJustify() {
return ["Ev"].includes(session!.type) ? "justify-center" : "justify-start";
}

function handleSessionClick() {
if (!clickable) return;
history.pushState(null, "", `/2024/agenda/${session!.id}/`);
Expand Down Expand Up @@ -171,14 +175,15 @@ export default function SessionCard({
}}
className="flex"
>
<div className="h-full flex">
<div
onClick={handleSessionClick}
className={twMerge(
`mx-3 my-2 flex flex-1 flex-col justify-between rounded-lg border border-[#d0b892] bg-[#eee4d2] p-3 transition`,
`flex flex-1 mx-3 my-2 flex-col justify-between rounded-lg border border-[#d0b892] bg-[#eee4d2] p-3 transition`,
clickable && "cursor-pointer hover:bg-[#e6d8c2]",
)}
>
<div className={`flex flex-1 flex-col gap-1 ${sessionMarginBottom()}`}>
<div className={`flex flex-1 flex-col gap-1 ${sessionJustify()} ${sessionMarginBottom()}`}>
<p
className={`font-bold ${sessionTextAlign()} ${sessionTextColor()} ${sessionFontSize()}`}
>
Expand Down Expand Up @@ -210,7 +215,9 @@ export default function SessionCard({
</span>
))}
</div>
</div>
</div>

<SessionDialog
open={isDialogOpen}
setOpen={setIsDialogOpen}
Expand Down

0 comments on commit aab98e3

Please sign in to comment.