fix: update page title and modify navigation button in SuccessComponent for improved user experience
This commit is contained in:
parent
eb21d7d116
commit
4d6203f317
|
|
@ -4,7 +4,7 @@
|
||||||
<meta charset="UTF-8" />
|
<meta charset="UTF-8" />
|
||||||
<link rel="icon" type="image/svg+xml" href="/assets/icons/logo.png" />
|
<link rel="icon" type="image/svg+xml" href="/assets/icons/logo.png" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
<title>图生视频</title>
|
<title>BestAiBest</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="root"></div>
|
<div id="root"></div>
|
||||||
|
|
|
||||||
|
|
@ -7,8 +7,8 @@ interface SuccessComponentProps {
|
||||||
const SuccessComponent: React.FC<SuccessComponentProps> = ({ task }) => {
|
const SuccessComponent: React.FC<SuccessComponentProps> = ({ task }) => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const handleTryAgain = () => {
|
const handleGoBack = () => {
|
||||||
navigate('/home');
|
navigate(-1);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDownload = () => {
|
const handleDownload = () => {
|
||||||
|
|
@ -29,16 +29,7 @@ const SuccessComponent: React.FC<SuccessComponentProps> = ({ task }) => {
|
||||||
<div className="result-container">
|
<div className="result-container">
|
||||||
{task?.outputUrl ? (
|
{task?.outputUrl ? (
|
||||||
task.outputUrl.includes('.mp4') ? (
|
task.outputUrl.includes('.mp4') ? (
|
||||||
<video
|
<video className="result-video" src={task.outputUrl} controls autoPlay muted loop playsInline webkit-playsinline="true" />
|
||||||
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" />
|
<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}>
|
<button className="download-btn" onClick={handleDownload}>
|
||||||
Download
|
Download
|
||||||
</button>
|
</button>
|
||||||
<button className="try-again-btn" onClick={handleTryAgain}>
|
<button className="try-again-btn" onClick={handleGoBack}>
|
||||||
Try Again
|
Go Back
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue