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,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { profile } from '$lib/auth'
|
||||
import { profile } from '$lib/auth.svelte.js'
|
||||
import Avatar from '$lib/components/ui/Avatar.svelte'
|
||||
import Header from '$lib/components/ui/layout/pages/Header.svelte'
|
||||
import { publishedToDate } from '$lib/components/util/date.js'
|
||||
@@ -35,11 +35,11 @@
|
||||
}
|
||||
|
||||
function conversationPreviews(
|
||||
conversations: PrivateMessageView[]
|
||||
conversations: PrivateMessageView[],
|
||||
): ConversationPreview[] {
|
||||
const deduplicated = filterDuplicates(
|
||||
conversations.toReversed(),
|
||||
(i) => i.creator.id
|
||||
(i) => i.creator.id,
|
||||
)
|
||||
|
||||
return deduplicated.map((i) => ({
|
||||
@@ -51,7 +51,7 @@
|
||||
}))
|
||||
}
|
||||
|
||||
let { data } = $props();
|
||||
let { data } = $props()
|
||||
</script>
|
||||
|
||||
<Header pageHeader>
|
||||
@@ -64,7 +64,7 @@
|
||||
{:then data}
|
||||
{@const conversations = data.private_messages}
|
||||
{@const previews = conversationPreviews(conversations).filter(
|
||||
(c) => c.user.id != $profile?.user?.local_user_view.person.id
|
||||
(c) => c.user.id != $profile?.user?.local_user_view.person.id,
|
||||
)}
|
||||
|
||||
<ul
|
||||
|
||||
Reference in new issue
Block a user