]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/pages/AlttpSeed.js
fix tech basepath
[alttp.git] / resources / js / components / pages / AlttpSeed.js
index 96589d4310a18a5f092347a380c74ccace93bc99..005d19a95830ab802ae15cbb130b391127c1993e 100644 (file)
@@ -1,5 +1,6 @@
 import axios from 'axios';
 import React, { useCallback, useEffect, useState } from 'react';
+import { Helmet } from 'react-helmet';
 import { useParams } from 'react-router-dom';
 
 import NotFound from './NotFound';
@@ -8,7 +9,7 @@ import ErrorBoundary from '../common/ErrorBoundary';
 import ErrorMessage from '../common/ErrorMessage';
 import Loading from '../common/Loading';
 
-const AosSeed = () => {
+const AlttpSeed = () => {
        const params = useParams();
        const { hash } = params;
 
@@ -24,7 +25,6 @@ const AosSeed = () => {
                                setError(null);
                                setLoading(false);
                                setSeed(response.data);
-                               window.document.title = response.data.hash;
                        })
                        .catch(error => {
                                setError(error);
@@ -96,8 +96,13 @@ const AosSeed = () => {
        }
 
        return <ErrorBoundary>
+               <Helmet>
+                       {seed ?
+                               <title>{seed.hash}</title>
+                       : null}
+               </Helmet>
                <Seed onRetry={retry} patch={patch} seed={seed} />
        </ErrorBoundary>;
 };
 
-export default AosSeed;
+export default AlttpSeed;