fix faulty key prop for dropdown item

pull/3096/head
Joseph Izang 2 years ago committed by Aniket
parent bdca988e5e
commit 63972425b9
  1. 5
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -523,7 +523,8 @@ export function Workspace () {
</div> </div>
</CustomTooltip>, </CustomTooltip>,
] ]
let menuLength = workspaceMenuIcons.length
let count = 0
return ( return (
<div className='d-flex flex-column justify-content-between h-100'> <div className='d-flex flex-column justify-content-between h-100'>
<div className='remixui_container overflow-auto' style={{ maxHeight: selectedWorkspace && selectedWorkspace.isGitRepo ? '95%' : '100%' }}> <div className='remixui_container overflow-auto' style={{ maxHeight: selectedWorkspace && selectedWorkspace.isGitRepo ? '95%' : '100%' }}>
@ -570,7 +571,7 @@ export function Workspace () {
{ {
workspaceMenuIcons.map(m => { workspaceMenuIcons.map(m => {
return ( return (
<Dropdown.Item key={`wsdropdownMenu-${new Date().getMilliseconds()}`}> <Dropdown.Item key={`wsdropdownMenu-${count !== menuLength ? count++ : count }`}>
{m} {m}
</Dropdown.Item> </Dropdown.Item>
) )

Loading…
Cancel
Save