/>
<Route
path="dungeons/:name"
- element={<Technique namespace="dungeons" type="dungeon" />}
+ element={<Technique basepath="dungeons" type="dungeon" />}
/>
<Route
path="events/:name"
/>
<Route
path="locations/:name"
- element={<Technique namespace="locations" type="location" />}
+ element={<Technique basepath="locations" type="location" />}
/>
<Route path="map">
<Route index element={<Navigate replace to="lw" />} />
/>
<Route
path="modes/:name"
- element={<Technique namespace="modes" type="mode" />}
+ element={<Technique basepath="modes" type="mode" />}
/>
<Route
path="rulesets"
/>
<Route
path="rulesets/:name"
- element={<Technique namespace="rulesets" type="ruleset" />}
+ element={<Technique basepath="rulesets" type="ruleset" />}
/>
<Route path="schedule" element={<Schedule />} />
<Route
/>
<Route
path="tech/:name"
- element={<Technique namespace="techniques" type="tech" />}
+ element={<Technique basepath="tech" type="tech" />}
/>
<Route path="tournaments/:id" element={<Tournament />} />
<Route path="users/:id" element={<User />} />
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();
<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)}
/>
};
Technique.propTypes = {
+ basepath: PropTypes.string,
type: PropTypes.string,
};