mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 02:13:33 +00:00
Add generic to CardRow type
squash cardrow type squash cardrow type
This commit is contained in:
parent
747633fb25
commit
6eb08243b7
4 changed files with 10 additions and 8 deletions
|
|
@ -9,6 +9,7 @@ import { Text } from '/@/renderer/components/text';
|
|||
import type { LibraryItem, CardRow, CardRoute, Play, PlayQueueAddOptions } from '/@/renderer/types';
|
||||
import { Skeleton } from '/@/renderer/components/skeleton';
|
||||
import { CardControls } from '/@/renderer/components/card/card-controls';
|
||||
import { Album } from '/@/renderer/api/types';
|
||||
|
||||
const CardWrapper = styled.div<{
|
||||
link?: boolean;
|
||||
|
|
@ -102,7 +103,7 @@ const Row = styled.div<{ $secondary?: boolean }>`
|
|||
|
||||
interface BaseGridCardProps {
|
||||
controls: {
|
||||
cardRows: CardRow[];
|
||||
cardRows: CardRow<Album>[];
|
||||
itemType: LibraryItem;
|
||||
playButtonBehavior: Play;
|
||||
route: CardRoute;
|
||||
|
|
@ -178,7 +179,7 @@ export const AlbumCard = ({
|
|||
</ControlsContainer>
|
||||
</ImageSection>
|
||||
<DetailSection>
|
||||
{cardRows.map((row: CardRow, index: number) => {
|
||||
{cardRows.map((row: CardRow<Album>, index: number) => {
|
||||
if (row.arrayProperty && row.route) {
|
||||
return (
|
||||
<Row
|
||||
|
|
@ -294,7 +295,7 @@ export const AlbumCard = ({
|
|||
<ImageSection />
|
||||
</Skeleton>
|
||||
<DetailSection style={{ width: '100%' }}>
|
||||
{cardRows.map((_row: CardRow, index: number) => (
|
||||
{cardRows.map((_row: CardRow<Album>, index: number) => (
|
||||
<Skeleton
|
||||
visible
|
||||
height={15}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue