♻️(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:
Nathan Vasse
2026-04-16 18:12:25 +02:00
parent 30cfcc7f46
commit 3670cefb30
3 changed files with 5 additions and 5 deletions

View File

@@ -10,7 +10,7 @@ type DurationBarProps = {
handleSeek: (e: React.ChangeEvent<HTMLInputElement>) => void;
};
export const ProgressBar = ({
export const DurationBar = ({
duration,
currentTime,
handleSeek,

View File

@@ -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}

View File

@@ -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}