Skip to content

Commit 6b64cec

Browse files
committed
fix: preferences - added missing react key
1 parent 36c17ff commit 6b64cec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/react-preferences/src/components/PreferencesV4.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect, useMemo, useState } from "react";
1+
import React, { Fragment, useEffect, useMemo, useState } from "react";
22
import styled from "styled-components";
33
import { usePreferences } from "@trycourier/react-hooks";
44
import {
@@ -405,7 +405,7 @@ export const PreferenceSections: React.FunctionComponent<{
405405
<>
406406
<SectionHeader>{section.name}</SectionHeader>
407407
{memoizedTopics.map(({ topic, recipientPreference }, index) => (
408-
<>
408+
<Fragment key={index}>
409409
<PreferenceTopic
410410
topic={topic}
411411
defaultRoutingOptions={section.routingOptions}
@@ -415,7 +415,7 @@ export const PreferenceSections: React.FunctionComponent<{
415415
routingPreferences={recipientPreference?.routingPreferences ?? []}
416416
/>
417417
{index < memoizedTopics.length - 1 && <SubscriptionDivider />}
418-
</>
418+
</Fragment>
419419
))}
420420
</>
421421
);

0 commit comments

Comments
 (0)