lemmy-ui/src/shared/initialize.ts
Orvar Segerström 397db2f1db PR feedback
2020-10-26 19:42:07 +01:00

9 lines
307 B
TypeScript

import { GetSiteResponse } from 'lemmy-js-client';
import { UserService } from './services';
import { i18n } from './i18next';
import { getLanguage } from './utils';
export function initializeSite(site: GetSiteResponse) {
UserService.Instance.user = site.my_user;
i18n.changeLanguage(getLanguage());
}