]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/pages/AosSeed.js
add aos seed retry button
[alttp.git] / resources / js / components / pages / AosSeed.js
index e3cfda8f93b6a8f3e6b754b6007691d1e0254eb3..165a2bedbea81e17a0576b53b6e761c578dc3e4d 100644 (file)
@@ -78,6 +78,11 @@ const AosSeed = () => {
                };
        }, [hash, seed]);
 
+       const retry = useCallback(async () => {
+               await axios.post(`/api/aos-seed/${hash}/retry`);
+               setSeed(seed => ({ ...seed, status: 'pending' }));
+       });
+
        if (loading) {
                return <Loading />;
        }
@@ -91,7 +96,7 @@ const AosSeed = () => {
        }
 
        return <ErrorBoundary>
-               <Seed patch={patch} seed={seed} />
+               <Seed onRetry={retry} patch={patch} seed={seed} />
        </ErrorBoundary>;
 };