Skip to content

Commit

Permalink
prepare for lrt sessions
Browse files Browse the repository at this point in the history
Signed-off-by: Vu Van Dung <me@joulev.dev>
  • Loading branch information
joulev committed Mar 28, 2024
1 parent c15d45f commit b157e8d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/app/blogs/walking-on-singapore-mrt-lines/panel.tsx
Expand Up @@ -355,14 +355,16 @@ function SessionSelectorButton({
const { activeSession, setActiveSession } = useActiveSession();
const isActive =
activeSession.lineIndex === lineIndex && activeSession.sessionIndex === sessionIndex;
const session = data[lineIndex].sessions[sessionIndex];
return (
<button
type="button"
{...useHoverBackground({})}
className={cn("hover-bg py-2 font-medium text-text-primary", isActive && "bg-bg-active")}
onClick={() => setActiveSession({ lineIndex, sessionIndex })}
>
{sessionIndex + 1}
{/* @ts-ignore */}
{session.label ?? sessionIndex + 1}
</button>
);
}
Expand Down

0 comments on commit b157e8d

Please sign in to comment.