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
-3
@@ -1,5 +1,5 @@
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import { userSettings } from '$lib/settings.js'
|
||||
import { settings } from '$lib/settings.svelte'
|
||||
import type { GetPostsResponse, ListingType, SortType } from 'lemmy-js-client'
|
||||
import { get, writable } from 'svelte/store'
|
||||
import { error } from '@sveltejs/kit'
|
||||
@@ -13,8 +13,6 @@ export async function load({ url, fetch }) {
|
||||
const cursor = url.searchParams.get('cursor') as string | undefined
|
||||
const prevCursor = url.searchParams.get('prevCursor') as string | undefined
|
||||
|
||||
const settings = get(userSettings)
|
||||
|
||||
const sort: SortType =
|
||||
(url.searchParams.get('sort') as SortType) || settings.defaultSort.sort
|
||||
const listingType: ListingType =
|
||||
|
||||
Reference in new issue
Block a user