fix: update page title and modify navigation button in SuccessComponent for improved user experience

This commit is contained in:
iHeyTang 2025-09-29 18:35:38 +08:00
parent eb21d7d116
commit 4d6203f317
2 changed files with 6 additions and 15 deletions

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/assets/icons/logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>图生视频</title>
<title>BestAiBest</title>
</head>
<body>
<div id="root"></div>

View File

@ -7,8 +7,8 @@ interface SuccessComponentProps {
const SuccessComponent: React.FC<SuccessComponentProps> = ({ task }) => {
const navigate = useNavigate();
const handleTryAgain = () => {
navigate('/home');
const handleGoBack = () => {
navigate(-1);
};
const handleDownload = () => {
@ -29,16 +29,7 @@ const SuccessComponent: React.FC<SuccessComponentProps> = ({ task }) => {
<div className="result-container">
{task?.outputUrl ? (
task.outputUrl.includes('.mp4') ? (
<video
className="result-video"
src={task.outputUrl}
controls
autoPlay
muted
loop
playsInline
webkit-playsinline="true"
/>
<video className="result-video" src={task.outputUrl} controls autoPlay muted loop playsInline webkit-playsinline="true" />
) : (
<img className="result-image" src={`https://api.bestaibest.ai/cdn/${encodeURIComponent(task.outputUrl)}`} alt="Generated result" />
)
@ -53,8 +44,8 @@ const SuccessComponent: React.FC<SuccessComponentProps> = ({ task }) => {
<button className="download-btn" onClick={handleDownload}>
Download
</button>
<button className="try-again-btn" onClick={handleTryAgain}>
Try Again
<button className="try-again-btn" onClick={handleGoBack}>
Go Back
</button>
</div>
</div>