Skip to content

Commit

Permalink
Resolve too much props passed to component issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kpyszkowski committed Aug 12, 2024
1 parent 358e904 commit 56950f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
11 changes: 7 additions & 4 deletions dapp/src/components/shared/ActivitiesList/ActivitiesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ function ActivitiesList(props: ListProps) {
return (
<MotionList pos="relative" w="full" {...props}>
<AnimatePresence mode="popLayout">
{latestActivities.map((item) => (
{latestActivities.map(({ id, amount, status, type, txHash }) => (
<MotionListItem
key={item.id}
key={id}
layout="position"
variants={listItemVariants}
initial={false}
Expand All @@ -43,8 +43,11 @@ function ActivitiesList(props: ListProps) {
_last={{ pb: 0 }}
>
<ActivitiesListItem
{...item}
handleDismiss={() => handleItemDismiss(item.id)}
amount={amount}
status={status}
type={type}
txHash={txHash}
handleDismiss={() => handleItemDismiss(id)}
/>
</MotionListItem>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
import { TextMd } from "../Typography"

type ActivitiesListItemProps = Omit<AlertProps, "status"> &
ActivityType & {
Omit<ActivityType, "id" | "finalizedAt" | "initializedAt"> & {
handleDismiss?: () => void
}

Expand Down

0 comments on commit 56950f3

Please sign in to comment.