fix: fix some case(maybe) can not key problem
This commit is contained in:
parent
3cc678f09e
commit
b64ca8b300
@ -16,7 +16,7 @@ import { DialogWrapper } from '@/components/DialogWrapper';
|
||||
import { useSocketSubscribeList } from '@/api/socketio';
|
||||
import { useMemo } from 'react';
|
||||
import { DynamicVirtualList } from '@/components/DynamicVirtualList';
|
||||
import { reverse } from 'lodash-es';
|
||||
import { get, reverse } from 'lodash-es';
|
||||
|
||||
export const Route = createFileRoute('/feed/$channelId/')({
|
||||
beforeLoad: routeAuthBeforeLoad,
|
||||
@ -127,7 +127,7 @@ function PageComponent() {
|
||||
hasNextPage={hasNextPage}
|
||||
isFetchingNextPage={isFetchingNextPage}
|
||||
onFetchNextPage={fetchNextPage}
|
||||
getItemKey={(index) => fullEvents[index].id}
|
||||
getItemKey={(index) => get(fullEvents, [index, 'id'])}
|
||||
renderItem={(item) => (
|
||||
<FeedEventItem className="animate-fade-in mb-2" event={item} />
|
||||
)}
|
||||
|
Loading…
Reference in New Issue
Block a user