Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…lydotdev/apps into fix-block-button-inside-link
  • Loading branch information
ilasw committed Jan 17, 2025
2 parents e8d4852 + f783008 commit a92a315
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
6 changes: 6 additions & 0 deletions packages/shared/src/components/PostOptionsMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ import {
import { isFollowingContent } from '../hooks/contentPreference/types';
import { useIsSpecialUser } from '../hooks/auth/useIsSpecialUser';
import { useActiveFeedContext } from '../contexts';
import { SharedFeedPage } from './utilities';

const ContextMenu = dynamic(
() => import(/* webpackChunkName: "contextMenu" */ './fields/ContextMenu'),
Expand Down Expand Up @@ -555,6 +556,11 @@ export default function PostOptionsMenu({
hideToast: true,
},
});

client.invalidateQueries({
queryKey: generateQueryKey(SharedFeedPage.MyFeed, user),
});

await showMessageAndRemovePost(
`🚫 ${post.author.name} has been ${
isCustomFeed ? 'removed' : 'blocked'
Expand Down
18 changes: 9 additions & 9 deletions packages/shared/src/components/modals/report/ReportUserModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ import { useToastNotification } from '../../../hooks';
import { useLazyModal } from '../../../hooks/useLazyModal';

const reportReasons: { value: string; label: string }[] = [
{ value: 'INAPPROPRIATE', label: 'Inappropriate or NSFW Content' },
{ value: 'TROLLING', label: 'Trolling or Disruptive Behavior' },
{ value: 'HARASSMENT', label: 'Harassment or Bullying' },
{ value: 'IMPERSONATION', label: 'Impersonation or False Identity' },
{ value: 'SPAM', label: 'Spam or Unsolicited Advertising' },
{ value: 'MISINFORMATION', label: 'Misinformation or False Claims' },
{ value: 'HATEFUL', label: 'Hate Speech or Discrimination' },
{ value: 'PRIVACY', label: 'Privacy or Copyright Violation' },
{ value: 'PLAGIARISM', label: 'Plagiarism or Content Theft' },
{ value: 'INAPPROPRIATE', label: 'Inappropriate or NSFW content' },
{ value: 'TROLLING', label: 'Trolling or disruptive behavior' },
{ value: 'HARASSMENT', label: 'Harassment or bullying' },
{ value: 'IMPERSONATION', label: 'Impersonation or false identity' },
{ value: 'SPAM', label: 'Spam or unsolicited advertising' },
{ value: 'MISINFORMATION', label: 'Misinformation or false claims' },
{ value: 'HATEFUL', label: 'Hate speech or discrimination' },
{ value: 'PRIVACY', label: 'Privacy or copyright violation' },
{ value: 'PLAGIARISM', label: 'Plagiarism or content theft' },
{ value: 'OTHER', label: 'Other' },
];

Expand Down
16 changes: 9 additions & 7 deletions packages/shared/src/components/profile/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ export function Header({
target={TargetId.MyProfile}
/>
)}
<FollowButton
entityId={user.id}
type={ContentPreferenceType.User}
status={contentPreference?.status}
entityName={`@${user.username}`}
className="flex-row-reverse"
/>
{!blocked && (
<FollowButton
entityId={user.id}
type={ContentPreferenceType.User}
status={contentPreference?.status}
entityName={`@${user.username}`}
className="flex-row-reverse"
/>
)}
{!isSameUser && (
<CustomFeedOptionsMenu
onAdd={(feedId) =>
Expand Down

0 comments on commit a92a315

Please sign in to comment.