feat: add new messages ui

This commit is contained in:
Xylight committed 2024-08-21 20:07:00 -07:00
1 parent ffdcac6c79
commit a77b3b3b78
10 files changed
+409 -23

No files matched your search

+14
View File
@@ -0,0 +1,14 @@
import { client } from '$lib/lemmy.js'
import { awaitIfServer } from '$lib/promise.js'
export async function load({ fetch, url }) {
const page = Number(url.searchParams.get('page')) || 1
const messagePromise = client({ func: fetch }).getPrivateMessages({
limit: 50,
})
return {
messages: (await awaitIfServer(messagePromise)).data,
}
}