Rename file: use-last-visible-item => use-get-last-visible-slot
No functional change, just renaming for clarity.
This commit is contained in:
parent
82f278dbde
commit
f5a0f39f59
3 changed files with 5 additions and 5 deletions
|
@ -7,7 +7,7 @@ import ClaimPreview from 'component/claimPreview';
|
|||
import Spinner from 'component/spinner';
|
||||
import { FormField } from 'component/common/form';
|
||||
import usePersistedState from 'effects/use-persisted-state';
|
||||
import useLastVisibleItem from 'effects/use-last-visible-item';
|
||||
import useGetLastVisibleSlot from 'effects/use-get-last-visible-slot';
|
||||
import debounce from 'util/debounce';
|
||||
import ClaimPreviewTile from 'component/claimPreviewTile';
|
||||
|
||||
|
@ -106,7 +106,7 @@ export default function ClaimList(props: Props) {
|
|||
|
||||
// Resolve the index for injectedItem, if provided; else injectedIndex will be 'undefined'.
|
||||
const listRef = React.useRef();
|
||||
const injectedIndex = useLastVisibleItem(injectedItem, listRef);
|
||||
const injectedIndex = useGetLastVisibleSlot(injectedItem, listRef);
|
||||
|
||||
// Exclude prefix uris in these results variables. We don't want to show
|
||||
// anything if the search failed or timed out.
|
||||
|
|
|
@ -5,7 +5,7 @@ import Button from 'component/button';
|
|||
import ClaimPreviewTile from 'component/claimPreviewTile';
|
||||
import I18nMessage from 'component/i18nMessage';
|
||||
import useFetchViewCount from 'effects/use-fetch-view-count';
|
||||
import useLastVisibleItem from 'effects/use-last-visible-item';
|
||||
import useGetLastVisibleSlot from 'effects/use-get-last-visible-slot';
|
||||
import useResolvePins from 'effects/use-resolve-pins';
|
||||
import useGetUserMemberships from 'effects/use-get-user-memberships';
|
||||
|
||||
|
@ -93,7 +93,7 @@ function ClaimTilesDiscover(props: Props) {
|
|||
} = props;
|
||||
|
||||
const listRef = React.useRef();
|
||||
const injectedIndex = useLastVisibleItem(injectedItem, listRef);
|
||||
const injectedIndex = useGetLastVisibleSlot(injectedItem, listRef);
|
||||
|
||||
const prevUris = React.useRef();
|
||||
const claimSearchUris = claimSearchResults || [];
|
||||
|
|
|
@ -10,7 +10,7 @@ type InjectedItem = { node: Node, index?: number, replace?: boolean };
|
|||
* @param listRef - A reference to the claim-grid
|
||||
* @returns {number}
|
||||
*/
|
||||
export default function useLastVisibleItem(injectedItem: ?InjectedItem, listRef: any) {
|
||||
export default function useGetLastVisibleSlot(injectedItem: ?InjectedItem, listRef: any) {
|
||||
const [injectedIndex, setInjectedIndex] = React.useState(injectedItem?.index);
|
||||
|
||||
React.useEffect(() => {
|
Loading…
Reference in a new issue