diff --git a/src/app/components/ReactionSummary.svelte b/src/app/components/ReactionSummary.svelte index fad73460..9d88180c 100644 --- a/src/app/components/ReactionSummary.svelte +++ b/src/app/components/ReactionSummary.svelte @@ -23,7 +23,7 @@ import Icon from "@lib/components/Icon.svelte" import Reaction from "@app/components/Reaction.svelte" import ReportDetails from "@app/components/ReportDetails.svelte" - import {REACTION_KINDS} from "@app/core/state" + import {REACTION_KINDS, deriveUserIsSpaceAdmin} from "@app/core/state" import {pushModal} from "@app/util/modal" interface Props { @@ -78,6 +78,8 @@ } } + const userIsAdmin = deriveUserIsSpaceAdmin(url) + const onReportClick = () => pushModal(ReportDetails, {url, event}) const reportReasons = $derived(uniq(map(e => getTag("e", e.tags)?.[2], $reports.values()))) @@ -118,7 +120,7 @@ {#if $reactions.length > 0 || $zaps.length || $reports.length > 0 || children}
- {#if url && $reports.length > 0} + {#if url && $reports.length > 0 && $userIsAdmin}