parent
a97159119d
commit
4832c46548
@ -35,6 +35,7 @@ export const BlogPage = () => {
|
||||
const isAdmin =
|
||||
userState.user?.npub &&
|
||||
userState.user.npub === import.meta.env.VITE_REPORTING_NPUB
|
||||
const isLoggedIn = userState.auth && userState.user?.pubkey !== 'undefined'
|
||||
const navigation = useNavigation()
|
||||
const [commentCount, setCommentCount] = useState(0)
|
||||
|
||||
@ -172,6 +173,7 @@ export const BlogPage = () => {
|
||||
Share
|
||||
</a>
|
||||
|
||||
{isLoggedIn && (
|
||||
<a
|
||||
className='dropdown-item dropdownMainMenuItem'
|
||||
id='reportPost'
|
||||
@ -189,6 +191,7 @@ export const BlogPage = () => {
|
||||
</svg>
|
||||
Report
|
||||
</a>
|
||||
)}
|
||||
|
||||
<a
|
||||
className='dropdown-item dropdownMainMenuItem'
|
||||
|
@ -194,6 +194,7 @@ const Game = () => {
|
||||
const { mod, isAddedToNSFW, isBlocked, isRepost } =
|
||||
useLoaderData() as ModPageLoaderResult
|
||||
const userState = useAppSelector((state) => state.user)
|
||||
const isLoggedIn = userState.auth && userState.user?.pubkey !== 'undefined'
|
||||
const [showReportPopUp, setShowReportPopUp] = useState<number | undefined>()
|
||||
|
||||
useBodyScrollDisable(!!showReportPopUp)
|
||||
@ -336,6 +337,7 @@ const Game = () => {
|
||||
</svg>
|
||||
Share
|
||||
</a>
|
||||
{isLoggedIn && (
|
||||
<a
|
||||
className='dropdown-item dropdownMainMenuItem'
|
||||
id='reportPost'
|
||||
@ -355,6 +357,7 @@ const Game = () => {
|
||||
</svg>
|
||||
Report
|
||||
</a>
|
||||
)}
|
||||
<a
|
||||
className='dropdown-item dropdownMainMenuItem'
|
||||
onClick={handleBlock}
|
||||
|
@ -59,6 +59,7 @@ export const ProfilePage = () => {
|
||||
const displayName =
|
||||
profile?.displayName || profile?.name || '[name not set up]'
|
||||
const [showReportPopUp, setShowReportPopUp] = useState(false)
|
||||
const isLoggedIn = userState.auth && userState.user?.pubkey !== 'undefined'
|
||||
const isOwnProfile =
|
||||
userState.auth &&
|
||||
userState.user?.pubkey &&
|
||||
@ -376,6 +377,7 @@ export const ProfilePage = () => {
|
||||
</a>
|
||||
{!isOwnProfile && (
|
||||
<>
|
||||
{isLoggedIn && (
|
||||
<a
|
||||
className='dropdown-item dropdownMainMenuItem'
|
||||
id='reportUser'
|
||||
@ -393,6 +395,7 @@ export const ProfilePage = () => {
|
||||
</svg>
|
||||
Report
|
||||
</a>
|
||||
)}
|
||||
<a
|
||||
className='dropdown-item dropdownMainMenuItem'
|
||||
onClick={isBlocked ? handleUnblock : handleBlock}
|
||||
|
Loading…
x
Reference in New Issue
Block a user