mirror of
https://github.com/suitenumerique/drive.git
synced 2026-04-25 17:15:19 +02:00
♻️(frontend) rename ProgressBar to DurationBar in preview
The component lives in DurationBar.tsx but was exported as ProgressBar, which was confusing. Rename the export and update the two call sites in AudioPlayer and VideoPlayer.
This commit is contained in:
@@ -10,7 +10,7 @@ type DurationBarProps = {
|
||||
handleSeek: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
||||
};
|
||||
|
||||
export const ProgressBar = ({
|
||||
export const DurationBar = ({
|
||||
duration,
|
||||
currentTime,
|
||||
handleSeek,
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
import React, { useRef, useState, useEffect, useCallback } from "react";
|
||||
import { clsx } from "clsx";
|
||||
import { ProgressBar } from "../../components/duration-bar/DurationBar";
|
||||
import { DurationBar } from "../../components/duration-bar/DurationBar";
|
||||
import { PlayerPreviewControls } from "../../components/controls/PreviewControls";
|
||||
|
||||
interface AudioPlayerProps {
|
||||
@@ -162,7 +162,7 @@ export const AudioPlayer: React.FC<AudioPlayerProps> = ({
|
||||
<div className="audio-player__title">{title}</div>
|
||||
</div>
|
||||
|
||||
<ProgressBar
|
||||
<DurationBar
|
||||
duration={duration}
|
||||
currentTime={currentTime}
|
||||
handleSeek={handleSeek}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
import React, { useRef, useState, useEffect, useCallback } from "react";
|
||||
import clsx from "clsx";
|
||||
import { Icon } from "@gouvfr-lasuite/ui-kit";
|
||||
import { ProgressBar } from "../../components/duration-bar/DurationBar";
|
||||
import { DurationBar } from "../../components/duration-bar/DurationBar";
|
||||
import { PlayerPreviewControls } from "../../components/controls/PreviewControls";
|
||||
|
||||
interface VideoPlayerProps {
|
||||
@@ -269,7 +269,7 @@ export const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
||||
|
||||
{controls && !isFullscreen && (
|
||||
<div className="video-player__controls">
|
||||
<ProgressBar
|
||||
<DurationBar
|
||||
duration={duration}
|
||||
currentTime={currentTime}
|
||||
handleSeek={handleSeek}
|
||||
|
||||
Reference in New Issue
Block a user