mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-15 21:16:17 +02:00
optimize list refresh functions
This commit is contained in:
@@ -46,6 +46,7 @@ export const GenreListPaginatedGrid = forwardRef<any, GenreListPaginatedGridProp
|
||||
|
||||
const { data, pageCount, totalItemCount } = useItemListPaginatedLoader({
|
||||
currentPage,
|
||||
eventKey: ItemListKey.GENRE,
|
||||
itemsPerPage,
|
||||
itemType: LibraryItem.GENRE,
|
||||
listCountQuery,
|
||||
|
||||
@@ -54,6 +54,7 @@ export const GenreListPaginatedTable = forwardRef<any, GenreListPaginatedTablePr
|
||||
|
||||
const { data, pageCount, totalItemCount } = useItemListPaginatedLoader({
|
||||
currentPage,
|
||||
eventKey: ItemListKey.GENRE,
|
||||
itemsPerPage,
|
||||
itemType: LibraryItem.GENRE,
|
||||
listCountQuery,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useMemo, useState } from 'react';
|
||||
import { useLocation, useParams } from 'react-router';
|
||||
import { useParams } from 'react-router';
|
||||
|
||||
import { ListContext } from '/@/renderer/context/list-context';
|
||||
import { useGenreList } from '/@/renderer/features/genres/api/genres-api';
|
||||
@@ -30,9 +30,6 @@ const GenreDetailRoute = () => {
|
||||
return genres?.items.find((g) => g.id === genreId)?.name || '—';
|
||||
}, [genreId, genres]);
|
||||
|
||||
const location = useLocation();
|
||||
console.log('location', location.pathname);
|
||||
|
||||
return (
|
||||
<AnimatedPage>
|
||||
<ListContext.Provider value={providerValue}>
|
||||
|
||||
Reference in New Issue
Block a user