fix: 修复配音库上传按钮跳转路径错误 (#1266) (#1267)
CI/CD Pipeline / Canary Release to Production (push) Failing after 956h22m53s
CI/CD Pipeline / Deploy Production (push) Failing after 956h25m32s
CI/CD Pipeline / CI Gate (push) Failing after 956h25m33s
CI/CD Pipeline / Build Production Web Image (push) Failing after 956h25m35s
CI/CD Pipeline / Build Production API Image (push) Failing after 956h25m36s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 956h38m39s
CI/CD Pipeline / PR Build API Image (push) Failing after 956h38m39s
CI/CD Pipeline / Frontend Lint (push) Failing after 956h38m39s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 956h41m9s
CI/CD Pipeline / Build Staging API Image (push) Successful in 16m10s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 2m45s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 5m48s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 48s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 40m43s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 17s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 4m48s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 1m7s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 37s
CI/CD Pipeline / Unit Tests (push) Successful in 10m47s
CI/CD Pipeline / Integration Tests (push) Successful in 2m45s
CI/CD Pipeline / Frontend Unit Tests (push) Failing after 13m1s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 35s
CI/CD Pipeline / Production Browser E2E (push) Failing after 956h58m52s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 956h58m55s
CI/CD Pipeline / PR Build Web Image (push) Failing after 957h11m59s
CI/CD Pipeline / Canary Release to Production (push) Failing after 956h22m53s
CI/CD Pipeline / Deploy Production (push) Failing after 956h25m32s
CI/CD Pipeline / CI Gate (push) Failing after 956h25m33s
CI/CD Pipeline / Build Production Web Image (push) Failing after 956h25m35s
CI/CD Pipeline / Build Production API Image (push) Failing after 956h25m36s
CI/CD Pipeline / PR Build Worker Image (push) Failing after 956h38m39s
CI/CD Pipeline / PR Build API Image (push) Failing after 956h38m39s
CI/CD Pipeline / Frontend Lint (push) Failing after 956h38m39s
CI/CD Pipeline / Check if frontend-only change (push) Failing after 956h41m9s
CI/CD Pipeline / Build Staging API Image (push) Successful in 16m10s
CI/CD Pipeline / Build Staging Web Image (push) Successful in 2m45s
CI/CD Pipeline / Build Staging Worker Image (push) Successful in 5m48s
CI/CD Pipeline / Deploy Staging (Watchtower auto-deploy) (push) Successful in 48s
CI/CD Pipeline / Staging E2E Tests (push) Failing after 40m43s
CI/CD Pipeline / Staging API Integration Tests (push) Failing after 17s
CI/CD Pipeline / Validate - Code Quality (push) Successful in 4m48s
CI/CD Pipeline / Validate - Type Check (mypy) (push) Successful in 1m7s
CI/CD Pipeline / Validate - Migration (alembic) (push) Successful in 37s
CI/CD Pipeline / Unit Tests (push) Successful in 10m47s
CI/CD Pipeline / Integration Tests (push) Successful in 2m45s
CI/CD Pipeline / Frontend Unit Tests (push) Failing after 13m1s
CI/CD Pipeline / ACR Image Cleanup (push) Successful in 35s
CI/CD Pipeline / Production Browser E2E (push) Failing after 956h58m52s
CI/CD Pipeline / Build Production Worker Image (push) Failing after 956h58m55s
CI/CD Pipeline / PR Build Web Image (push) Failing after 957h11m59s
Co-authored-by: xiaoxia <dev@xiaoxiajianji.com> Co-committed-by: xiaoxia <dev@xiaoxiajianji.com>
This commit was merged in pull request #1267.
This commit is contained in:
@@ -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