import i18n from '../i18n';
export const getLink = tech => {
+ if (tech.type === 'dungeon') {
+ return `/dungeons/${tech.name}`;
+ }
+ if (tech.type === 'location') {
+ return `/locations/${tech.name}`;
+ }
if (tech.type === 'mode') {
return `/modes/${tech.name}`;
}
};
export const getTranslation = (tech, prop, lang) => {
+ if (!tech) return '';
const direct = tech.translations.find(t => t.locale === lang);
if (direct) {
return direct[prop];