mirror of
https://github.com/Zagrios/bs-manager.git
synced 2026-07-03 14:08:25 +02:00
[feature-107] Implement playlists linking + remove possibility to play a playlist for now + some refacto
This commit is contained in:
@@ -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" ? "%" : "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user