forked from mito-systems/sol-mem-gen
Display message in UI before reloading
This commit is contained in:
parent
de0b4d42c2
commit
cc64e6a035
@ -60,7 +60,10 @@ const AIServiceCard: React.FC<AIServiceCardProps> = ({
|
|||||||
loading: false,
|
loading: false,
|
||||||
error: result.error,
|
error: result.error,
|
||||||
})
|
})
|
||||||
return
|
// Reload the page to get latest prices
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.reload();
|
||||||
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.imageUrl) {
|
if (result.imageUrl) {
|
||||||
@ -121,7 +124,7 @@ const AIServiceCard: React.FC<AIServiceCardProps> = ({
|
|||||||
|
|
||||||
{generationState.error && (
|
{generationState.error && (
|
||||||
<div className="mt-4 bg-red-900/20 border border-red-500/20 text-red-400 px-4 py-3 rounded-xl text-center">
|
<div className="mt-4 bg-red-900/20 border border-red-500/20 text-red-400 px-4 py-3 rounded-xl text-center">
|
||||||
{generationState.error}
|
{generationState.error}, reloading...
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
@ -65,8 +65,6 @@ export async function generateWithFlux(
|
|||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Flux generation error:', error)
|
console.error('Flux generation error:', error)
|
||||||
// Reload the page to get latest prices
|
|
||||||
window.location.reload();
|
|
||||||
return {
|
return {
|
||||||
error: error instanceof Error ? error.message : 'Generation failed'
|
error: error instanceof Error ? error.message : 'Generation failed'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user