Skip to content

Commit

Permalink
switched past session switch to radio button
Browse files Browse the repository at this point in the history
  • Loading branch information
draw-n committed Apr 5, 2024
1 parent ebe8f06 commit dd0495f
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions components/judges/schedule.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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 = [
Expand Down Expand Up @@ -269,13 +269,8 @@ export function JudgeSchedule({ data, cutoffIndex, handleChange }: ScheduleProps
<Table.Summary fixed={true}>
<Table.Summary.Row>
<Table.Summary.Cell index={0} colSpan={6}>
<Switch
checkedChildren="Hide past sessions"
unCheckedChildren="Include past sessions"
onChange={checked => {
setShowPast(checked);
}}
/>
<Radio checked={showPast} onClick={() => setShowPast(!showPast)} />
Show Past Sessions
</Table.Summary.Cell>
</Table.Summary.Row>
</Table.Summary>
Expand Down

0 comments on commit dd0495f

Please sign in to comment.