Skip to content

Commit

Permalink
Fix pre-release check
Browse files Browse the repository at this point in the history
  • Loading branch information
breiler committed Dec 28, 2024
1 parent b492540 commit 1dbe3f0
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/panels/firmware/Firmware.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const Firmware = ({ onInstall }: Props) => {
};

const fetchReleases = () => {
GithubService.getReleases(Boolean(showPrerelease))
GithubService.getReleases(showPrerelease === "true")
.then((releases) => {
setReleases(releases);
})
Expand Down Expand Up @@ -159,21 +159,23 @@ const Firmware = ({ onInstall }: Props) => {
/>
}
>
<Dropdown.Item>
<Dropdown.Item
onClick={() =>
setShowPrerelease(
(
showPrerelease !==
"true"
).toString()
)
}
>
{" "}
<FormCheck
type="switch"
label="Show pre-releases"
checked={
showPrerelease === "true"
}
onChange={(event) => {
setShowPrerelease(
Boolean(
event.target.checked
).toString()
);
}}
/>
</Dropdown.Item>
<Dropdown.Divider />
Expand Down

0 comments on commit 1dbe3f0

Please sign in to comment.