]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/pages/Technique.js
fix tech basepath
[alttp.git] / resources / js / components / pages / Technique.js
index 32acd284f56fcd5f4250432ed7c4368e4ced245c..30eed5b03a4104634ac5f806f3c7a563693b76cb 100644 (file)
@@ -20,7 +20,7 @@ import { getLanguages, getMatchedLocale, getTranslation } from '../../helpers/Te
 import { useUser } from '../../helpers/UserContext';
 import i18n from '../../i18n';
 
-const Technique = ({ type }) => {
+const Technique = ({ basepath, type }) => {
        const params = useParams();
        const { name } = params;
        const user = useUser();
@@ -91,7 +91,7 @@ const Technique = ({ type }) => {
                        <meta name="description" content={getTranslation(technique, 'short', i18n.language)} />
                </Helmet>
                <CanonicalLinks
-                       base={`/tech/${technique.name}`}
+                       base={`/${basepath}/${technique.name}`}
                        lang={getMatchedLocale(technique, i18n.language)}
                        langs={getLanguages(technique)}
                />
@@ -107,6 +107,7 @@ const Technique = ({ type }) => {
 };
 
 Technique.propTypes = {
+       basepath: PropTypes.string,
        type: PropTypes.string,
 };