Skip to content

Commit f492fd8

Browse files
committed
fix issue with closing view all modal
1 parent 413add4 commit f492fd8

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

src/components/relay-dashboard/paid-subscribers/PaidSubscribers.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ export const PaidSubscribers: React.FC = () => {
142142

143143
// Handle closing view all modal
144144
const handleCloseViewAllModal = () => {
145+
setSelectedSubscriber(null);
145146
setIsViewAllModalVisible(false);
146147
};
147148

@@ -180,13 +181,13 @@ export const PaidSubscribers: React.FC = () => {
180181
</NFTCardHeader>
181182

182183
<S.FlexWrapper>
183-
{sortedProfiles.map(([pubkey, subscriber]) => (
184-
<S.CardWrapper key={pubkey}>
184+
{sortedProfiles.map(([pubkey, subscriber], index) => (
185+
<S.CardWrapper key={`${pubkey}-${index}`}>
185186
{subscriber.picture ? (
186187
<SubscriberAvatar
187-
onStoryOpen={() => handleOpenSubscriberDetails(subscriber)}
188188
img={subscriber.picture || ''}
189189
viewed={false}
190+
onStoryOpen={() => handleOpenSubscriberDetails(subscriber)}
190191
/>
191192
) : (
192193
<CreatorButton $viewed={false}>
@@ -356,9 +357,9 @@ export const PaidSubscribers: React.FC = () => {
356357
</NFTCardHeader>
357358
<SplideTrack>
358359
{!loadingProfiles &&
359-
sortedProfiles.map(([pubkey, subscriber]) => (
360+
sortedProfiles.map(([pubkey, subscriber], index) => (
360361
<SplideSlide key={pubkey}>
361-
<S.CardWrapper key={pubkey}>
362+
<S.CardWrapper key={`${pubkey}-${index}`}>
362363
{subscriber.picture ? (
363364
<SubscriberAvatar
364365
onStoryOpen={() => handleOpenSubscriberDetails(subscriber)}

0 commit comments

Comments
 (0)