mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 04:20:12 +02:00
rename list components
This commit is contained in:
+5
-8
@@ -15,17 +15,14 @@ import {
|
||||
} from 'react';
|
||||
import { List, ListImperativeAPI, RowComponentProps, useListRef } from 'react-window-v2';
|
||||
|
||||
import styles from './item-list-detail.module.css';
|
||||
import styles from './item-detail-list.module.css';
|
||||
|
||||
import { ItemDetail } from '/@/renderer/components/item-detail/item-detail';
|
||||
import { ExpandedListItem } from '/@/renderer/components/item-list/expanded-list-item';
|
||||
import {
|
||||
ItemListStateActions,
|
||||
useItemListState,
|
||||
} from '/@/renderer/components/item-list/helpers/item-list-state';
|
||||
import { useItemListState } from '/@/renderer/components/item-list/helpers/item-list-state';
|
||||
import { LibraryItem } from '/@/shared/types/domain-types';
|
||||
|
||||
export interface ItemGridProps {
|
||||
export interface ItemDetailListProps {
|
||||
data: unknown[];
|
||||
enableExpansion?: boolean;
|
||||
enableSelection?: boolean;
|
||||
@@ -64,7 +61,7 @@ const expandedAnimationVariants: Variants = {
|
||||
},
|
||||
};
|
||||
|
||||
export const ItemListDetail = ({
|
||||
export const ItemDetailList = ({
|
||||
data,
|
||||
enableExpansion = false,
|
||||
enableSelection = false,
|
||||
@@ -79,7 +76,7 @@ export const ItemListDetail = ({
|
||||
onScrollEnd,
|
||||
onStartReached,
|
||||
totalItemCount = 0,
|
||||
}: ItemGridProps) => {
|
||||
}: ItemDetailListProps) => {
|
||||
const itemDetailRef = useListRef(null);
|
||||
const scrollContainerRef = useRef<HTMLDivElement | null>(null);
|
||||
const { ref: containerRef, width: containerWidth } = useElementSize();
|
||||
+4
-4
@@ -16,7 +16,7 @@ import {
|
||||
} from 'react';
|
||||
import { List, ListImperativeAPI, RowComponentProps, useListRef } from 'react-window-v2';
|
||||
|
||||
import styles from './item-grid.module.css';
|
||||
import styles from './item-grid-list.module.css';
|
||||
|
||||
import { getDataRowsCount, ItemCard } from '/@/renderer/components/item-card/item-card';
|
||||
import { ExpandedListItem } from '/@/renderer/components/item-list/expanded-list-item';
|
||||
@@ -26,7 +26,7 @@ import {
|
||||
} from '/@/renderer/components/item-list/helpers/item-list-state';
|
||||
import { LibraryItem } from '/@/shared/types/domain-types';
|
||||
|
||||
export interface ItemGridProps {
|
||||
export interface ItemGridListProps {
|
||||
data: unknown[];
|
||||
enableExpansion?: boolean;
|
||||
enableSelection?: boolean;
|
||||
@@ -75,7 +75,7 @@ const expandedAnimationVariants: Variants = {
|
||||
},
|
||||
};
|
||||
|
||||
export const ItemGrid = ({
|
||||
export const ItemGridList = ({
|
||||
data,
|
||||
enableExpansion = false,
|
||||
enableSelection = false,
|
||||
@@ -90,7 +90,7 @@ export const ItemGrid = ({
|
||||
onScrollEnd,
|
||||
onStartReached,
|
||||
totalItemCount = 0,
|
||||
}: ItemGridProps) => {
|
||||
}: ItemGridListProps) => {
|
||||
const itemGridRef = useListRef(null);
|
||||
const scrollContainerRef = useRef<HTMLDivElement | null>(null);
|
||||
const { ref: containerRef, width: containerWidth } = useElementSize();
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
InfiniteListProps,
|
||||
useItemListInfiniteLoader,
|
||||
} from '/@/renderer/components/item-list/helpers/item-list-infinite-loader';
|
||||
import { ItemGrid } from '/@/renderer/components/item-list/item-grid/item-grid';
|
||||
import { ItemGridList } from '/@/renderer/components/item-list/item-grid-list/item-grid-list';
|
||||
import { albumQueries } from '/@/renderer/features/albums/api/album-api';
|
||||
import {
|
||||
AlbumListQuery,
|
||||
@@ -44,7 +44,7 @@ export const AlbumListInfiniteGrid = forwardRef<any, AlbumListInfiniteGridProps>
|
||||
});
|
||||
|
||||
return (
|
||||
<ItemGrid
|
||||
<ItemGridList
|
||||
data={data || []}
|
||||
itemType={LibraryItem.ALBUM}
|
||||
onRangeChanged={onRangeChanged}
|
||||
|
||||
@@ -6,7 +6,7 @@ import {
|
||||
PaginatedListProps,
|
||||
useItemListPaginatedLoader,
|
||||
} from '/@/renderer/components/item-list/helpers/item-list-paginated-loader';
|
||||
import { ItemGrid } from '/@/renderer/components/item-list/item-grid/item-grid';
|
||||
import { ItemGridList } from '/@/renderer/components/item-list/item-grid-list/item-grid-list';
|
||||
import { ItemListWithPagination } from '/@/renderer/components/item-list/item-list-pagination/item-list-pagination';
|
||||
import { useItemListPagination } from '/@/renderer/components/item-list/item-list-pagination/use-item-list-pagination';
|
||||
import { albumQueries } from '/@/renderer/features/albums/api/album-api';
|
||||
@@ -58,7 +58,7 @@ export const AlbumListPaginatedGrid = forwardRef<any, AlbumListPaginatedGridProp
|
||||
pageCount={pageCount}
|
||||
totalItemCount={totalItemCount}
|
||||
>
|
||||
<ItemGrid data={data || []} itemType={LibraryItem.ALBUM} ref={ref} />
|
||||
<ItemGridList data={data || []} itemType={LibraryItem.ALBUM} ref={ref} />
|
||||
</ItemListWithPagination>
|
||||
);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user