Skip to content

Commit 47c74b6

Browse files
committed
useId() from react to generate unique id on rendering
1 parent b9cee42 commit 47c74b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

components/Editor/Header.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useMemo } from 'react'
1+
import { useMemo, useId } from 'react'
22

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

@@ -37,7 +37,7 @@ const EditorHeader = ({ codeType, onCodeTypeChange }: Props) => {
3737
isSearchable={false}
3838
classNamePrefix="select"
3939
menuPlacement="auto"
40-
instanceId="headerSelect"
40+
instanceId={useId()}
4141
/>
4242
</div>
4343
</div>

0 commit comments

Comments
 (0)