From ad197fdd621d539834d9aaf9c6961f976a607a88 Mon Sep 17 00:00:00 2001 From: daniyal Date: Mon, 11 Nov 2024 23:10:00 +0500 Subject: [PATCH] chore: necessary fixes after merging stagging branch --- src/components/ModsFilter.tsx | 4 ++-- src/utils/consts.ts | 11 +++++++++-- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/ModsFilter.tsx b/src/components/ModsFilter.tsx index 781518c..2a5384c 100644 --- a/src/components/ModsFilter.tsx +++ b/src/components/ModsFilter.tsx @@ -130,9 +130,9 @@ export const ModFilter = React.memo( import.meta.env.VITE_REPORTING_NPUB const isOwnProfile = - filterOptions.author && + author && userState.auth && - userState.user?.pubkey === filterOptions.author + userState.user?.pubkey === author if (!(isAdmin || isOwnProfile)) return null } diff --git a/src/utils/consts.ts b/src/utils/consts.ts index ff8e47b..611a3a8 100644 --- a/src/utils/consts.ts +++ b/src/utils/consts.ts @@ -1,8 +1,15 @@ -import { FilterOptions, SortBy, NSFWFilter, ModeratedFilter } from 'types' +import { + FilterOptions, + SortBy, + NSFWFilter, + ModeratedFilter, + WOTFilterOptions +} from 'types' export const DEFAULT_FILTER_OPTIONS: FilterOptions = { sort: SortBy.Latest, nsfw: NSFWFilter.Hide_NSFW, source: window.location.host, - moderated: ModeratedFilter.Moderated + moderated: ModeratedFilter.Moderated, + wot: WOTFilterOptions.Site_Only }