misc: make community cards consistent
This commit is contained in:
1 parent
dd1dce9b6b
commit
eef339bf4c
9 files changed
+47
-131
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import { profile } from '$lib/auth.js'
|
||||
import { profile, type Profile } from '$lib/auth.js'
|
||||
import { getClient } from '$lib/lemmy.js'
|
||||
import { trycatch } from '$lib/util.js'
|
||||
import type { Community, MyUserInfo, PersonView } from 'lemmy-js-client'
|
||||
@@ -62,3 +62,6 @@ export const addAdmin = async (handle: string, added: boolean, jwt: string) =>
|
||||
person_id: user.person.person.id,
|
||||
})
|
||||
})
|
||||
|
||||
export const hasFavorite = (profile: Profile, id: number): boolean =>
|
||||
profile?.favorites?.map((i) => i.id).includes(id) ?? false
|
||||
Reference in new issue
Block a user