feat: add profile page filtering

This commit is contained in:
Xyphyn committed 2023-07-27 12:48:43 -07:00
1 parent 575662ae2c
commit 53ef843cde
2 files changed
+30 -11

No files matched your search

+6
View File
@@ -0,0 +1,6 @@
import type { MyUserInfo } from 'lemmy-js-client'
export const isMod = (me: MyUserInfo, community: number) =>
me.moderates.map((c) => c.community.id).includes(community)
export const isAdmin = (me: MyUserInfo) => me.local_user_view.person.admin