diff --git a/src/Element/BlockList.tsx b/src/Element/BlockList.tsx
index 7125f0f5..bcf91d5e 100644
--- a/src/Element/BlockList.tsx
+++ b/src/Element/BlockList.tsx
@@ -8,20 +8,32 @@ import ProfilePreview from "Element/ProfilePreview";
import useMutedFeed, { getMuted } from "Feed/MuteList";
import useModeration from "Hooks/useModeration";
-export default function BlockList() {
+interface BlockListProps {
+ variant: "muted" | "blocked"
+}
+
+export default function BlockList({ variant }: BlockListProps) {
const { publicKey } = useSelector((s: RootState) => s.login)
const { blocked, muted } = useModeration();
return (
-
Muted ({muted.length})
- {muted.map(a => {
- return
} pubkey={a} options={{ about: false }} key={a} />
- })}
-
Blocked ({blocked.length})
- {blocked.map(a => {
- return
} pubkey={a} options={{ about: false }} key={a} />
- })}
+ {variant === "muted" && (
+ <>
+
{muted.length} muted
+ {muted.map(a => {
+ return
} pubkey={a} options={{ about: false }} key={a} />
+ })}
+ >
+ )}
+ {variant === "blocked" && (
+ <>
+
{blocked.length} blocked
+ {blocked.map(a => {
+ return
} pubkey={a} options={{ about: false }} key={a} />
+ })}
+ >
+ )}
)
}
diff --git a/src/Pages/ProfilePage.tsx b/src/Pages/ProfilePage.tsx
index adddf75c..3724f55a 100644
--- a/src/Pages/ProfilePage.tsx
+++ b/src/Pages/ProfilePage.tsx
@@ -30,7 +30,8 @@ enum ProfileTab {
Reactions = "Reactions",
Followers = "Followers",
Follows = "Follows",
- Muted = "Muted"
+ Muted = "Muted",
+ Blocked = "Blocked"
};
export default function ProfilePage() {
@@ -124,7 +125,10 @@ export default function ProfilePage() {
return
}
case ProfileTab.Muted: {
- return isMe ? :
+ return isMe ? :
+ }
+ case ProfileTab.Blocked: {
+ return isMe ? : null
}
}
}
@@ -165,6 +169,10 @@ export default function ProfilePage() {
)
}
+ function renderTab(v: ProfileTab) {
+ return setTab(v)}>{v}
+ }
+
return (
<>
@@ -175,9 +183,8 @@ export default function ProfilePage() {
- {[ProfileTab.Notes, ProfileTab.Followers, ProfileTab.Follows, ProfileTab.Muted].map(v => {
- return
setTab(v)}>{v}
- })}
+ {[ProfileTab.Notes, ProfileTab.Followers, ProfileTab.Follows, ProfileTab.Muted].map(renderTab)}
+ {isMe && renderTab(ProfileTab.Blocked)}
{tabContent()}
>