1 import { Component } from "inferno";
2 import { Helmet } from "inferno-helmet";
3 import { UserService } from "../../services";
9 export class Theme extends Component<Props> {
11 let user = UserService.Instance.myUserInfo;
12 let hasTheme = user?.local_user_view.local_user.theme !== "browser";
14 if (user && hasTheme) {
20 href={`/css/themes/${user.local_user_view.local_user.theme}.css`}
24 } else if (this.props.defaultTheme != "browser") {
30 href={`/css/themes/${this.props.defaultTheme}.css`}
40 href="/css/themes/litely.css"
42 media="(prefers-color-scheme: light)"
47 href="/css/themes/darkly.css"
49 media="(prefers-color-scheme: no-preference), (prefers-color-scheme: dark)"