Skip to content

Commit

Permalink
Merge pull request #57 from florijanqosja/validate-fix
Browse files Browse the repository at this point in the history
update 16
  • Loading branch information
florijanqosja authored Jan 1, 2024
2 parents f919cb8 + 1590742 commit 18d9a79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions web/src/components/Sections/Audiovalidate.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ export default function AudioValidater() {

const onLoading = ({ wavesurfer, originalArgs = [] }) => {
wavesurferRef.current = wavesurfer;
setWavesurfer(wavesurferRef.current); // New line
};

const onPosChange = (newPos) => {
Expand All @@ -100,9 +101,9 @@ export default function AudioValidater() {

const handleRegionClick = () => {
if (wavesurfer && wavesurfer.isPlaying()) {
wavesurfer.stop(); // Stop the audio playback
wavesurfer.stop();
}
setPlaying(false); // Set the playing state to false
setPlaying(false);
};

const removeRegion = (name) => {
Expand Down
6 changes: 3 additions & 3 deletions web/src/components/Sections/Pricing.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export default function Pricing() {
try {
const response = await axios.get(`${process.env.REACT_APP_API_DOMAIN_PROD}dataset_insight_info`);
const data = response.data;
const total = data.total_labeled + data.total_unlabeled + data.total_validated;
const totalDuration = data.total_duration_labeled + data.total_duration_unlabeled + data.total_duration_validated;
// const total = data.total_labeled + data.total_unlabeled + data.total_validated;
// const totalDuration = data.total_duration_labeled + data.total_duration_unlabeled + data.total_duration_validated;
data.sumofLabeled = data.total_labeled;
data.sumofUnLabeled = data.total_unlabeled;
data.sumofValidated = data.total_validated;
Expand Down Expand Up @@ -205,7 +205,7 @@ export default function Pricing() {
<div className={classes.circularProgressbar}>
<CircularProgressbar
value={calculatePercentage(
(summaryInfo.total_unlabeled + summaryInfo.total_labeled),
summaryInfo.total_unlabeled,
(summaryInfo.total_labeled + summaryInfo.total_validated + summaryInfo.total_unlabeled))}
text={`${calculatePercentage(
(summaryInfo.total_unlabeled + summaryInfo.total_labeled),
Expand Down

0 comments on commit 18d9a79

Please sign in to comment.