Skip to content

Commit

Permalink
change switch label
Browse files Browse the repository at this point in the history
  • Loading branch information
Janderson Souza Matias authored and Janderson Souza Matias committed Nov 3, 2023
1 parent a33284c commit 0630f63
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/pages/CoachOverTime/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const CoachOverTimePage: React.FC = () => {
const [sessionOverTime, setSessionOverTime] = useState<ISessionOverTime[]>([]);
const [isLoadingList, setIsLoadingList] = useState(false);
const [sessionToView, setSessionToView] = useState<ISession>();
const [showOnlyWithValues, setShowOnlyWithValues] = useState(false);
const [showOnlyWithValues, setShowOnlyWithValues] = useState(true);
const [region, setRegion] = useState<string>();
const [schoolId, setSchoolId] = useState<string>();

Expand Down Expand Up @@ -86,11 +86,11 @@ const CoachOverTimePage: React.FC = () => {

<VStack alignItems="start" ml="12px">
<FormLabel htmlFor="onlyWithValues" mb="0" cursor="pointer">
Only schools with sessions?
Include schools with no data
</FormLabel>
<Switch
id="onlyWithValues"
isChecked={showOnlyWithValues}
isChecked={!showOnlyWithValues}
onChange={(e) => setShowOnlyWithValues(Boolean(e.target.checked))}
/>
</VStack>
Expand Down
6 changes: 3 additions & 3 deletions src/pages/SessionData/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const SessionDataPage: React.FC = () => {
const [period, setPeriod] = useState<string>();
const [region, setRegion] = useState<string>();
const [schoolId, setSchoolId] = useState<string>();
const [showOnlyWithValues, setShowOnlyWithValues] = useState(false);
const [showOnlyWithValues, setShowOnlyWithValues] = useState(true);

useEffect(() => {
loadSessions(period, region, schoolId, showOnlyWithValues);
Expand Down Expand Up @@ -82,11 +82,11 @@ const SessionDataPage: React.FC = () => {

<VStack alignItems="start" ml="12px">
<FormLabel htmlFor="onlyWithValues" mb="0" cursor="pointer">
Only schools with sessions?
Include schools with no data
</FormLabel>
<Switch
id="onlyWithValues"
isChecked={showOnlyWithValues}
isChecked={!showOnlyWithValues}
onChange={(e) => setShowOnlyWithValues(Boolean(e.target.checked))}
/>
</VStack>
Expand Down

0 comments on commit 0630f63

Please sign in to comment.