From: Dessalines Date: Fri, 16 Jul 2021 16:51:54 +0000 (-0400) Subject: Fix symbols issue. Fixes #319 X-Git-Url: http://these/git/%22https:/lemmy.ml/u/Liwott/%7Biframely.url%7D?a=commitdiff_plain;h=1a4db014d710586881cc01b7fefe4c8b2cafa0a0;p=lemmy-ui.git Fix symbols issue. Fixes #319 --- diff --git a/src/server/index.tsx b/src/server/index.tsx index 2d2a662..7af8da8 100644 --- a/src/server/index.tsx +++ b/src/server/index.tsx @@ -15,6 +15,7 @@ import IsomorphicCookie from "isomorphic-cookie"; import { GetSite, GetSiteResponse, LemmyHttp } from "lemmy-js-client"; import process from "process"; import { Helmet } from "inferno-helmet"; +import { SYMBOLS } from "../shared/components/symbols"; import { initializeSite } from "../shared/initialize"; import { httpBaseInternal } from "../shared/env"; import { IncomingHttpHeaders } from "http"; @@ -109,6 +110,7 @@ server.get("/*", async (req, res) => { ); const root = renderToString(wrapper); + const symbols = renderToString(SYMBOLS); const cspStr = process.env.LEMMY_EXTERNAL_HOST ? renderToString(cspHtml) : ""; const helmet = Helmet.renderStatic(); @@ -140,6 +142,10 @@ server.get("/*", async (req, res) => { ${helmet.link.toString()} + + + ${symbols} + @@ -160,9 +166,9 @@ server.listen(Number(port), hostname, () => { console.log(`http://${hostname}:${port}`); }); -function setForwardedHeaders( - headers: IncomingHttpHeaders -): { [key: string]: string } { +function setForwardedHeaders(headers: IncomingHttpHeaders): { + [key: string]: string; +} { let out = { host: headers.host, }; diff --git a/src/shared/components/app.tsx b/src/shared/components/app.tsx index 898c93c..179db4d 100644 --- a/src/shared/components/app.tsx +++ b/src/shared/components/app.tsx @@ -8,7 +8,6 @@ import { Navbar } from "./navbar"; import { Footer } from "./footer"; import { NoMatch } from "./no-match"; import { Theme } from "./theme"; -import { Symbols } from "./symbols"; import { GetSiteResponse } from "lemmy-js-client"; import "./styles.scss"; import { favIconPngUrl, favIconUrl } from "../utils"; @@ -59,7 +58,6 @@ export class App extends Component { ))} } /> -