[feature-107] Implement playlists linking + remove possibility to play a playlist for now + some refacto

This commit is contained in:
MathieuG-P
2024-02-26 15:24:51 +01:00
parent a36ccb0c13
commit 487d0c1f8b
19 changed files with 192 additions and 71 deletions
@@ -1,6 +1,6 @@
import { CSSProperties } from "react";
import { useObservable } from "renderer/hooks/use-observable.hook";
import { Observable } from "rxjs";
import { Observable, map } from "rxjs";
type Props = {
value$: Observable<number | string>;
@@ -9,7 +9,7 @@ type Props = {
};
export default function TextProgressBar({ value$, className, style }: Props) {
const value = useObservable(() => value$);
const value = useObservable(() => value$.pipe(map(v => Math.round(Number(v)))));
const prefix = typeof value === "number" ? "%" : "";