mirror of
https://github.com/jeffvli/feishin.git
synced 2026-06-09 22:02:19 +02:00
lint all files
This commit is contained in:
@@ -19,20 +19,17 @@ import { ItemListKey } from '/@/shared/types/types';
|
||||
interface PlaylistListInfiniteGridProps extends ItemListGridComponentProps<PlaylistListQuery> {}
|
||||
|
||||
export const PlaylistListInfiniteGrid = forwardRef<any, PlaylistListInfiniteGridProps>(
|
||||
(
|
||||
{
|
||||
gap = 'md',
|
||||
itemsPerPage = 100,
|
||||
itemsPerRow,
|
||||
query = {
|
||||
sortBy: PlaylistListSort.NAME,
|
||||
sortOrder: SortOrder.ASC,
|
||||
},
|
||||
saveScrollOffset = true,
|
||||
serverId,
|
||||
({
|
||||
gap = 'md',
|
||||
itemsPerPage = 100,
|
||||
itemsPerRow,
|
||||
query = {
|
||||
sortBy: PlaylistListSort.NAME,
|
||||
sortOrder: SortOrder.ASC,
|
||||
},
|
||||
ref,
|
||||
) => {
|
||||
saveScrollOffset = true,
|
||||
serverId,
|
||||
}) => {
|
||||
const listCountQuery = playlistsQueries.listCount({
|
||||
query: { ...query },
|
||||
serverId: serverId,
|
||||
|
||||
@@ -1,8 +1,4 @@
|
||||
import {
|
||||
parseAsJson,
|
||||
parseAsString,
|
||||
useQueryState,
|
||||
} from 'nuqs';
|
||||
import { parseAsJson, useQueryState } from 'nuqs';
|
||||
|
||||
import { useSearchTermFilter } from '/@/renderer/features/shared/hooks/use-search-term-filter';
|
||||
import { useSortByFilter } from '/@/renderer/features/shared/hooks/use-sort-by-filter';
|
||||
@@ -17,16 +13,13 @@ export const usePlaylistListFilters = () => {
|
||||
|
||||
const { searchTerm, setSearchTerm } = useSearchTermFilter('');
|
||||
|
||||
const [custom, setCustom] = useQueryState(
|
||||
'playlistCustom',
|
||||
parseAsJson(customFiltersSchema),
|
||||
);
|
||||
const [custom, setCustom] = useQueryState('playlistCustom', parseAsJson(customFiltersSchema));
|
||||
|
||||
const query = {
|
||||
_custom: custom ?? undefined,
|
||||
searchTerm: searchTerm ?? undefined,
|
||||
sortBy: sortByFilter[FILTER_KEYS.SHARED.SORT_BY] ?? undefined,
|
||||
sortOrder: sortOrderFilter[FILTER_KEYS.SHARED.SORT_ORDER] ?? undefined,
|
||||
_custom: custom ?? undefined,
|
||||
};
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user