]> Untitled Git - lemmy-ui.git/commitdiff
Refactor
authorOrvar Segerström <orvarsegerstrom@gmail.com>
Mon, 26 Oct 2020 14:22:14 +0000 (15:22 +0100)
committerOrvar Segerström <orvarsegerstrom@gmail.com>
Mon, 26 Oct 2020 14:22:14 +0000 (15:22 +0100)
src/server/index.tsx

index 6a7ffbe418f090e63a98413ccc65d524d5499e7f..34bd4536f5d5f8b9a5c26aadcc7f6fde3fe484a4 100644 (file)
@@ -89,7 +89,7 @@ server.get('/*', async (req, res) => {
            <!DOCTYPE html>
            <html ${helmet.htmlAttributes.toString()} lang="en">
            <head>
-           <script>window.isoData = ${serialize(isoData)}</script>      
+           <script>window.isoData = ${serialize(isoData)}</script>
 
            ${helmet.title.toString()}
            ${helmet.meta.toString()}
@@ -109,14 +109,12 @@ server.get('/*', async (req, res) => {
 
            <!-- Styles -->
            <link rel="stylesheet" type="text/css" href="/static/styles/styles.css" />
-           ${userTheme || ''}
            ${
-             userTheme
-               ? ''
-               : `
+             userTheme ??
+             `
            <link rel="stylesheet" type="text/css" href="/static/assets/css/themes/litely.min.css" id="default-light" media="(prefers-color-scheme: light)" />
            <link rel="stylesheet" type="text/css" href="/static/assets/css/themes/darkly.min.css" id="default-dark" media="(prefers-color-scheme: no-preference), (prefers-color-scheme: dark)" />
-           `
+           `.trim()
            }
            </head>