Skip to content

Commit

Permalink
adjust sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
tarikcoskun committed Oct 10, 2024
1 parent b3e205e commit 618fe4a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion components/DownloadButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function DownloadButton() {

<Dropdown.Menu>
<Dropdown.MenuGroup>
{Object.entries(downloads).filter(([platform]) => platform !== os).sort((_, [b]) => b.includes(os as string) ? 1 : -1).map(([platform, properties]) => (
{Object.entries(downloads).filter(([platform]) => platform !== os).sort(([a], [b]) => b.includes(os as string) ? 1 : a.includes(os as string) ? -1 : 0).map(([platform, properties]) => (
<Button
key={platform}
as="a"
Expand Down
8 changes: 4 additions & 4 deletions config/links.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ export const downloads = {
link: "https://github.com/TagStudioDev/TagStudio/releases/latest/download/tagstudio_windows_x86_64_portable.zip",
icon: <Windows />,
},
"Mac": {
link: "https://github.com/TagStudioDev/TagStudio/releases/latest/download/tagstudio_macos_x86_64.tar.gz",
icon: <Apple />,
},
"Linux": {
link: "https://github.com/TagStudioDev/TagStudio/releases/latest/download/tagstudio_linux_x86_64.tar.gz",
icon: <Icon lib="lucide" icon="download" />,
Expand All @@ -21,8 +25,4 @@ export const downloads = {
link: "https://github.com/TagStudioDev/TagStudio/releases/latest/download/tagstudio_linux_x86_64_portable.tar.gz",
icon: <Icon lib="lucide" icon="download" />,
},
"Mac": {
link: "https://github.com/TagStudioDev/TagStudio/releases/latest/download/tagstudio_macos_x86_64.tar.gz",
icon: <Apple />,
},
};

0 comments on commit 618fe4a

Please sign in to comment.