From 43d19a319bd92f6fa12c1c70b1961fd782bf0bf9 Mon Sep 17 00:00:00 2001 From: teodorus-nathaniel Date: Wed, 13 Mar 2024 00:00:30 +0700 Subject: [PATCH 1/2] Hide post preview from grill admin --- src/components/posts/view-post/PostPreview.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/posts/view-post/PostPreview.tsx b/src/components/posts/view-post/PostPreview.tsx index 91e71b2e4..659c9ad8b 100644 --- a/src/components/posts/view-post/PostPreview.tsx +++ b/src/components/posts/view-post/PostPreview.tsx @@ -26,6 +26,8 @@ export type PreviewProps = BarePreviewProps & { showPinnedIcon?: boolean } +// grill admin account +const HIDE_PREVIEW_FROM_ACCOUNT = ['3rPYmfYVHG7NtuGDivDNZdMMRHgrwtVuswY9TWUaHQCU8tAo'] export function PostPreview(props: PreviewProps) { const { postDetails, space: externalSpace, showPinnedIcon } = props const { @@ -35,8 +37,9 @@ export function PostPreview(props: PreviewProps) { const { isSharedPost } = post const space = externalSpace || globalSpace const isUnlisted = useIsUnlistedPost({ post, space: space?.struct }) + const isHiddenPreview = HIDE_PREVIEW_FROM_ACCOUNT.includes(post.ownerId) - if (isUnlisted) return null + if (isUnlisted || isHiddenPreview) return null const postContent = postDetails.post.content const isEmptyContent = !isSharedPost && !postContent?.title && !postContent?.body From b92cfb858ce94218587983ed0f0f9f31a8ce5480 Mon Sep 17 00:00:00 2001 From: teodorus-nathaniel Date: Wed, 13 Mar 2024 00:04:43 +0700 Subject: [PATCH 2/2] Add another account to hide preview --- src/components/posts/view-post/PostPreview.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/posts/view-post/PostPreview.tsx b/src/components/posts/view-post/PostPreview.tsx index 659c9ad8b..c888da929 100644 --- a/src/components/posts/view-post/PostPreview.tsx +++ b/src/components/posts/view-post/PostPreview.tsx @@ -26,8 +26,11 @@ export type PreviewProps = BarePreviewProps & { showPinnedIcon?: boolean } -// grill admin account -const HIDE_PREVIEW_FROM_ACCOUNT = ['3rPYmfYVHG7NtuGDivDNZdMMRHgrwtVuswY9TWUaHQCU8tAo'] +// grill admin account and grill memes admin +const HIDE_PREVIEW_FROM_ACCOUNT = [ + '3rPYmfYVHG7NtuGDivDNZdMMRHgrwtVuswY9TWUaHQCU8tAo', + '3oGjkULuNKRqi513BbohWiSgA2oKMrbSnPrcddpXYC4mtW1G', +] export function PostPreview(props: PreviewProps) { const { postDetails, space: externalSpace, showPinnedIcon } = props const {