Compare commits
No commits in common. "143e3756b91fdf27af9083c462742ab29b487aa9" and "bcb3cfb0a8a4b891b6f4905633f6b274d7673518" have entirely different histories.
143e3756b9
...
bcb3cfb0a8
|
|
@ -47,7 +47,6 @@ export default function Create() {
|
|||
|
||||
// 提交处理
|
||||
const handleSubmit = async () => {
|
||||
console.log('handleSubmit', template?.imageCount, image1, image2, prompt);
|
||||
if (!isLoggedIn) {
|
||||
setLoginRedirecting(true);
|
||||
setLoading(true);
|
||||
|
|
@ -58,7 +57,7 @@ export default function Create() {
|
|||
alert('Template code not set');
|
||||
return;
|
||||
}
|
||||
if ((template?.imageCount && !image1) || (template?.imageCount === 2 && !image2)) {
|
||||
if (template?.imageCount && !image1 || (template?.imageCount === 2 && !image2)) {
|
||||
alert('Upload two images');
|
||||
return;
|
||||
}
|
||||
|
|
@ -154,7 +153,7 @@ export default function Create() {
|
|||
<div className="submit-section">
|
||||
<button
|
||||
className={`submit-button ${(!image1 || (template?.imageCount === 2 && !image2) || loading) && isLoggedIn ? 'disabled' : ''}`}
|
||||
disabled={((template?.imageCount && !image1) || (template?.imageCount === 2 && !image2) || loading) && isLoggedIn}
|
||||
disabled={(!image1 || (template?.imageCount === 2 && !image2) || loading) && isLoggedIn}
|
||||
onClick={handleSubmit}
|
||||
>
|
||||
{isLoggedIn === false ? (
|
||||
|
|
|
|||
Loading…
Reference in New Issue