Cleanup getting instance's languages in AboutInstance

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2021-09-07 17:54:26 +02:00
parent 9c7a4f0079
commit 68065a611a
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773
2 changed files with 5 additions and 10 deletions

View file

@ -103,12 +103,13 @@ import { Component, Vue } from "vue-property-decorator";
import { CONFIG } from "@/graphql/config";
import { IConfig } from "@/types/config.model";
import RouteName from "../router/name";
import { CURRENT_USER_CLIENT } from "@/graphql/user";
import { ICurrentUser } from "@/types/current-user.model";
@Component({
apollo: {
config: {
query: CONFIG,
},
config: CONFIG,
currentUser: CURRENT_USER_CLIENT,
},
metaInfo() {
return {
@ -122,6 +123,7 @@ import RouteName from "../router/name";
})
export default class About extends Vue {
config!: IConfig;
currentUser!: ICurrentUser;
RouteName = RouteName;
}

View file

@ -114,7 +114,6 @@ import { ABOUT } from "../../graphql/config";
import { STATISTICS } from "../../graphql/statistics";
import { IConfig } from "../../types/config.model";
import { IStatistics } from "../../types/statistics.model";
import langs from "../../i18n/langs.json";
@Component({
apollo: {
@ -159,12 +158,6 @@ export default class AboutInstance extends Vue {
}
return "";
}
// eslint-disable-next-line class-methods-use-this
getLanguageNameForCode(code: string): string {
const languageMaps = langs as Record<string, any>;
return languageMaps[code];
}
}
</script>