From d78adac2000d7f08322cfebff5f46cda5397bd75 Mon Sep 17 00:00:00 2001 From: draw-n Date: Fri, 5 Apr 2024 16:25:35 -0500 Subject: [PATCH] switched past session switch to radio button (#459) Co-authored-by: draw-n Co-authored-by: Isaac Liu <69013063+xnscdev@users.noreply.github.com> --- components/judges/schedule.tsx | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/components/judges/schedule.tsx b/components/judges/schedule.tsx index 3391f3d1..b49bb613 100644 --- a/components/judges/schedule.tsx +++ b/components/judges/schedule.tsx @@ -1,4 +1,4 @@ -import { Space, Table, Collapse, Tag, Switch, Button, notification, Upload, Spin, theme } from 'antd'; +import { Space, Table, Collapse, Tag, Switch, Button, notification, Upload, Spin, theme, Radio } from 'antd'; import React, { useContext, useMemo, useState } from 'react'; import { DateTime } from 'luxon'; import Link from 'next/link'; @@ -183,7 +183,7 @@ export default function OrganizerSchedule(props: ScheduleProps) { } export function JudgeSchedule({ data, cutoffIndex, handleChange }: ScheduleProps) { - const [showPast, setShowPast] = useState(true); + const [showPast, setShowPast] = useState(false); const { accentColor, baseTheme } = useContext(ThemeContext); const columns = [ @@ -275,13 +275,8 @@ export function JudgeSchedule({ data, cutoffIndex, handleChange }: ScheduleProps - { - setShowPast(checked); - }} - /> + setShowPast(!showPast)} /> + Show Past Sessions