swiper
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { useRoute } from "@react-navigation/core";
|
||||
import { useAudioPlayer } from "expo-audio";
|
||||
import { Image as ExpoImage } from "expo-image";
|
||||
import React, { useEffect, useMemo, useRef, useState } from "react";
|
||||
@@ -34,8 +33,8 @@ import Style, { gutters, size } from "../../styles/Style";
|
||||
// 20 secondes
|
||||
const timeBeforeIncrement = 20000;
|
||||
|
||||
const MusicDetails = () => {
|
||||
const params = useRoute().params || {};
|
||||
const MusicDetails = ({ route }) => {
|
||||
const { params } = route || {};
|
||||
const action = params?.action;
|
||||
const projectId = params?.projectId || null;
|
||||
const [fav, setFav] = useState(false);
|
||||
@@ -218,7 +217,10 @@ const MusicDetails = () => {
|
||||
[progressInfo.pos]
|
||||
);
|
||||
// Preview lead: show words 0.5s earlier
|
||||
const visibleTimeS = useMemo(() => Math.max(0, currentTimeS + 0.5), [currentTimeS]);
|
||||
const visibleTimeS = useMemo(
|
||||
() => Math.max(0, currentTimeS + 0.5),
|
||||
[currentTimeS]
|
||||
);
|
||||
// Group words into timed lines (similar to KaraokeLyrics)
|
||||
const groupAlignedWordsToLines = (words = [], { removeTags = true } = {}) => {
|
||||
const out = [];
|
||||
|
||||
Reference in New Issue
Block a user