migrate: change settings from a store to a state
This commit is contained in:
1 parent
ffcd9faa96
commit
d597349887
128 files changed
+1010
-1144
No files matched your search
@@ -1,10 +1,10 @@
|
||||
import { browser } from '$app/environment'
|
||||
import { env } from '$env/dynamic/public'
|
||||
import { profile } from '$lib/auth.js'
|
||||
import { profile } from '$lib/auth.svelte'
|
||||
import CommunityCard from '$lib/components/lemmy/community/CommunityCard.svelte'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import { awaitIfServer } from '$lib/promise.js'
|
||||
import { SSR_ENABLED, userSettings } from '$lib/settings.js'
|
||||
import { SSR_ENABLED, settings } from '$lib/settings.svelte'
|
||||
import { error } from '@sveltejs/kit'
|
||||
import type { GetComments } from 'lemmy-js-client'
|
||||
import { get } from 'svelte/store'
|
||||
@@ -35,7 +35,7 @@ export async function load({ params, url, fetch }) {
|
||||
max_depth = 10
|
||||
}
|
||||
|
||||
const sort = get(userSettings)?.defaultSort?.comments ?? 'Hot'
|
||||
const sort = settings?.defaultSort?.comments ?? 'Hot'
|
||||
|
||||
const commentParams: GetComments = {
|
||||
post_id: Number(params.id),
|
||||
|
||||
Reference in new issue
Block a user