fix: 修复配音库上传按钮跳转路径错误 (#1266) #1267
@@ -3,6 +3,7 @@
|
||||
* 展示用户已上传的配音素材,支持选中、预览播放
|
||||
*/
|
||||
import React, { useState, useRef, useCallback } from "react"
|
||||
import { useNavigate } from "react-router-dom"
|
||||
import { useQuery } from "@tanstack/react-query"
|
||||
import { AudioOutlined, SoundOutlined } from "@ant-design/icons"
|
||||
import { getAssetsByKind } from "@/api/assets"
|
||||
@@ -34,6 +35,7 @@ const Step5VoiceSelect: React.FC<Step5VoiceSelectProps> = ({
|
||||
selectedVoice,
|
||||
onSelectedVoiceChange,
|
||||
}) => {
|
||||
const navigate = useNavigate()
|
||||
const [playingId, setPlayingId] = useState<string | null>(null)
|
||||
const audioRef = useRef<HTMLAudioElement | null>(null)
|
||||
|
||||
@@ -86,8 +88,8 @@ const Step5VoiceSelect: React.FC<Step5VoiceSelectProps> = ({
|
||||
|
||||
/** 跳转到配音库上传 */
|
||||
const handleGoToUpload = useCallback(() => {
|
||||
window.location.href = "/voices"
|
||||
}, [])
|
||||
navigate("/app/voices")
|
||||
}, [navigate])
|
||||
|
||||
// 加载中状态
|
||||
if (isLoading) {
|
||||
|
||||
Reference in New Issue
Block a user