Skip to content
This repository was archived by the owner on Mar 19, 2021. It is now read-only.

style(features/cards): just stylistic fixes #83

Merged
merged 1 commit into from
Jul 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions src/features/cards/organisms/skeleton-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,16 @@ type Props = {
renderEmpty: () => React.Node,
}

const DEFAULT_SKELETON_COUNT = 3

export const SkeletonList = ({
isLoading,
ids,
count = 3,
count = DEFAULT_SKELETON_COUNT,
renderEmpty,
}: Props) =>
isLoading ? (
<>
{Array.from({ length: count }, (_, idx) => (
<CardSkeleton key={idx} />
))}
</>
Array.from<*>({ length: count }, (_, idx) => <CardSkeleton key={idx} />)
) : (
<CardsList ids={ids} renderEmpty={renderEmpty} />
)
Expand Down