Skip to content

Commit

Permalink
useId() from react to generate unique id on rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieuauger committed Mar 18, 2024
1 parent 10d9db9 commit 1d8d75e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/Editor/Header.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useMemo } from 'react'
import { useMemo, useId } from 'react'

import Select, { OnChangeValue } from 'react-select'

Expand Down Expand Up @@ -37,7 +37,7 @@ const EditorHeader = ({ codeType, onCodeTypeChange }: Props) => {
isSearchable={false}
classNamePrefix="select"
menuPlacement="auto"
instanceId="headerSelect"
instanceId={useId()}
/>
</div>
</div>
Expand Down

0 comments on commit 1d8d75e

Please sign in to comment.