diff --git a/src/client/index.tsx b/src/client/index.tsx index ffe52ce8..a7af06de 100644 --- a/src/client/index.tsx +++ b/src/client/index.tsx @@ -2,7 +2,6 @@ import { initializeSite, setupDateFns } from "@utils/app"; import { hydrate } from "inferno-hydrate"; import { BrowserRouter } from "inferno-router"; import { App } from "../shared/components/app/app"; -import { UserService } from "../shared/services"; import "bootstrap/js/dist/collapse"; import "bootstrap/js/dist/dropdown"; @@ -15,7 +14,7 @@ async function startClient() { const wrapper = ( - + ); diff --git a/src/server/handlers/catch-all-handler.tsx b/src/server/handlers/catch-all-handler.tsx index 3fd9327a..aacbc21d 100644 --- a/src/server/handlers/catch-all-handler.tsx +++ b/src/server/handlers/catch-all-handler.tsx @@ -117,7 +117,7 @@ export default async (req: Request, res: Response) => { const wrapper = ( - + ); diff --git a/src/shared/components/app/app.tsx b/src/shared/components/app/app.tsx index c573ea41..5709f766 100644 --- a/src/shared/components/app/app.tsx +++ b/src/shared/components/app/app.tsx @@ -3,10 +3,9 @@ import { dataBsTheme } from "@utils/browser"; import { Component, RefObject, createRef, linkEvent } from "inferno"; import { Provider } from "inferno-i18next-dess"; import { Route, Switch } from "inferno-router"; -import { MyUserInfo } from "lemmy-js-client"; import { IsoDataOptionalSite } from "../../interfaces"; import { routes } from "../../routes"; -import { FirstLoadService, I18NextService, UserService } from "../../services"; +import { FirstLoadService, I18NextService } from "../../services"; import AuthGuard from "../common/auth-guard"; import ErrorGuard from "../common/error-guard"; import { ErrorPage } from "./error-page"; @@ -17,14 +16,10 @@ import { Theme } from "./theme"; import AnonymousGuard from "../common/anonymous-guard"; import { CodeTheme } from "./code-theme"; -interface AppProps { - user?: MyUserInfo; -} - -export class App extends Component { +export class App extends Component { private isoData: IsoDataOptionalSite = setIsoData(this.context); private readonly mainContentRef: RefObject; - constructor(props: AppProps, context: any) { + constructor(props: any, context: any) { super(props, context); this.mainContentRef = createRef(); } @@ -34,8 +29,6 @@ export class App extends Component { this.mainContentRef.current?.focus(); } - user = UserService.Instance.myUserInfo; - render() { const siteRes = this.isoData.site_res; const siteView = siteRes?.site_view; @@ -46,7 +39,7 @@ export class App extends Component {