Merge pull request #424 from w3irdrobot/key-on-tabs

Added key attr to Tabs to remove React warning
This commit is contained in:
Kieran 2023-03-10 20:52:01 +00:00 committed by GitHub
commit ef48f553b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -32,7 +32,7 @@ const Tabs = ({ tabs, tab, setTab }: TabsProps) => {
return (
<div className="tabs" ref={horizontalScroll}>
{tabs.map(t => (
<TabElement tab={tab} setTab={setTab} t={t} />
<TabElement key={t.value} tab={tab} setTab={setTab} t={t} />
))}
</div>
);