mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-12 04:18:54 +00:00
fix(core): fix member list fallback size (#8133)
This commit is contained in:
@@ -35,6 +35,7 @@ import {
|
||||
import { cssVar } from '@toeverything/theme';
|
||||
import clsx from 'clsx';
|
||||
import { useSetAtom } from 'jotai';
|
||||
import { clamp } from 'lodash-es';
|
||||
import type { ReactElement } from 'react';
|
||||
import { useCallback, useEffect, useMemo, useState } from 'react';
|
||||
|
||||
@@ -286,9 +287,10 @@ const MemberList = ({
|
||||
<MemberListFallback
|
||||
memberCount={
|
||||
memberCount
|
||||
? Math.max(
|
||||
? clamp(
|
||||
memberCount - pageNum * membersService.members.PAGE_SIZE,
|
||||
1
|
||||
1,
|
||||
membersService.members.PAGE_SIZE
|
||||
)
|
||||
: 1
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user