Skip to content

Commit

Permalink
fix: addition of missing keys
Browse files Browse the repository at this point in the history
  • Loading branch information
tomashco committed Jun 4, 2024
1 parent 78ea765 commit b28928b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/InstagramPostsClient/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type ResponseType = {
const LoadingCards = () =>
Array(6)
.fill(0)
.map(() => <div style={cardStyle} />)
.map((_el, ind) => <div key={ind} style={cardStyle} />)

const baseEndpoint = '/api/instagram/list/'
const childrenEndpoint = '/api/instagram/children/'
Expand Down Expand Up @@ -72,7 +72,7 @@ function Posts() {
<div style={postsContainerStyle}>
{!isPending && !isFetching && Array.isArray(response.data) ? (
response?.data?.map(({ id, media_type, media_url, permalink, caption }) => (
<div style={cardStyle}>
<div key={id} style={cardStyle}>
<div style={{ position: 'absolute', top: '0', right: '1rem' }}>
{instagramPosts?.docs?.find(el => el.id === id) ? (
<Button disabled>Already in collection</Button>
Expand Down

0 comments on commit b28928b

Please sign in to comment.