fix: ssr always off even when enabled
This commit is contained in:
2 files changed
+5
-1
No files matched your search
@@ -1,8 +1,9 @@
|
||||
import { browser } from '$app/environment'
|
||||
import { settings } from '$lib/settings.svelte'
|
||||
import { aliases, loadTranslations } from '$lib/i18n/translations.js'
|
||||
import { env } from '$env/dynamic/public'
|
||||
|
||||
export const ssr = false
|
||||
export const ssr = env.PUBLIC_SSR_ENABLED?.toLowerCase() == 'true'
|
||||
|
||||
export const load = async () => {
|
||||
if (browser) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { env } from '$env/dynamic/public'
|
||||
import { t } from '$lib/i18n/translations.js'
|
||||
import { postFeed } from '$lib/lemmy/postfeed.svelte.js'
|
||||
import { ReactiveState, awaitIfServer } from '$lib/promise.svelte.js'
|
||||
@@ -26,6 +27,8 @@ export async function load({ url, fetch }) {
|
||||
fetch: fetch,
|
||||
})
|
||||
|
||||
if (env.PUBLIC_SSR_ENABLED?.toLowerCase() == 'true') await feed
|
||||
|
||||
return {
|
||||
feed: new ReactiveState((await awaitIfServer(feed)).data),
|
||||
filters: new ReactiveState({
|
||||
|
||||
Reference in new issue
Block a user