mirror of
https://github.com/p-stream/p-stream.git
synced 2026-03-28 19:08:43 +00:00
Revert "maybe add check beside active embed?"
This reverts commit 76124c9299.
This commit is contained in:
parent
d6a9fc50a1
commit
c12acf8cd9
1 changed files with 1 additions and 15 deletions
|
|
@ -31,15 +31,6 @@ export function EmbedOption(props: {
|
|||
const { t } = useTranslation();
|
||||
const unknownEmbedName = t("player.menus.sources.unknownOption");
|
||||
|
||||
const currentSourceId = usePlayerStore((s) => s.sourceId);
|
||||
const captionList = usePlayerStore((s) => s.captionList);
|
||||
|
||||
const isActive = useMemo(() => {
|
||||
if (currentSourceId !== props.sourceId) return false;
|
||||
|
||||
return captionList.some((caption) => caption.id.includes(props.embedId));
|
||||
}, [currentSourceId, props.sourceId, props.embedId, captionList]);
|
||||
|
||||
const embedName = useMemo(() => {
|
||||
if (!props.embedId) return unknownEmbedName;
|
||||
const sourceMeta = getCachedMetadata().find((s) => s.id === props.embedId);
|
||||
|
|
@ -54,12 +45,7 @@ export function EmbedOption(props: {
|
|||
);
|
||||
|
||||
return (
|
||||
<SelectableLink
|
||||
loading={loading}
|
||||
error={errored}
|
||||
onClick={run}
|
||||
selected={isActive}
|
||||
>
|
||||
<SelectableLink loading={loading} error={errored} onClick={run}>
|
||||
<span className="flex flex-col">
|
||||
<span>{embedName}</span>
|
||||
</span>
|
||||
|
|
|
|||
Loading…
Reference in a new issue