diff --git a/src/components/player/atoms/settings/SettingsMenu.tsx b/src/components/player/atoms/settings/SettingsMenu.tsx index 6e1f4d2f..14b3827f 100644 --- a/src/components/player/atoms/settings/SettingsMenu.tsx +++ b/src/components/player/atoms/settings/SettingsMenu.tsx @@ -37,6 +37,8 @@ export function SettingsMenu({ id }: { id: string }) { const source = usePlayerStore((s) => s.source); + const downloadable = source?.type === "file" || source?.type === "hls"; + return ( @@ -58,12 +60,10 @@ export function SettingsMenu({ id }: { id: string }) { - router.navigate( - source?.type === "file" ? "/download" : "/download/unable", - ) + router.navigate(downloadable ? "/download" : "/download/unable") } rightSide={} - className={source?.type === "file" ? "opacity-100" : "opacity-50"} + className={downloadable ? "opacity-100" : "opacity-50"} > {t("player.menus.settings.downloadItem")}