diff --git a/web/pages/admin/federation/followers.tsx b/web/pages/admin/federation/followers.tsx
index 761692783..519f287ae 100644
--- a/web/pages/admin/federation/followers.tsx
+++ b/web/pages/admin/federation/followers.tsx
@@ -33,6 +33,25 @@ export interface Follower {
approved: Date;
}
+const FollowersTable = ({ data, tableColumns, totalCount, setCurrentPage }) => (
+
row.link}
+ pagination={{
+ pageSize: 25,
+ hideOnSinglePage: true,
+ showSizeChanger: false,
+ total: totalCount,
+ }}
+ onChange={pagination => {
+ const page = pagination.current;
+ setCurrentPage(page);
+ }}
+ />
+);
+
export default function FediverseFollowers() {
const [followersPending, setFollowersPending] = useState([]);
const [followersBlocked, setFollowersBlocked] = useState([]);
@@ -47,7 +66,7 @@ export default function FediverseFollowers() {
const getFollowers = async () => {
try {
- const limit = 50;
+ const limit = 25;
const offset = currentPage * limit;
const u = `${FOLLOWERS}?offset=${offset}&limit=${limit}`;
@@ -116,27 +135,6 @@ export default function FediverseFollowers() {
},
];
- function makeTable(data: Follower[], tableColumns: ColumnsType) {
- return (
- row.link}
- pagination={{
- pageSize: 50,
- hideOnSinglePage: true,
- showSizeChanger: false,
- total: totalCount,
- }}
- onChange={pagination => {
- const page = pagination.current;
- setCurrentPage(page);
- }}
- />
- );
- }
-
async function approveFollowRequest(request) {
try {
await fetchData(SET_FOLLOWER_APPROVAL, {
@@ -307,7 +305,12 @@ export default function FediverseFollowers() {
const followersTab = (
<>
The following accounts get notified when you go live or send a post.
- {makeTable(followers, followersColumns)}{' '}
+
>
);
@@ -323,7 +326,12 @@ export default function FediverseFollowers() {
{' '}
and be alerted to when you go live. Each must be approved.
- {makeTable(followersPending, pendingColumns)}
+ row.link}
+ />
>
);
@@ -336,7 +344,14 @@ export default function FediverseFollowers() {
The following people were either rejected or blocked by you. You can approve them as a
follower.
- {makeTable(followersBlocked, blockedColumns)}
+
+