fix key prop warning for file explorer menu

pull/3096/head
Joseph Izang 2 years ago committed by Aniket
parent a4d15eebc3
commit a8d4f1744b
  1. 4
      libs/remix-ui/workspace/src/lib/components/file-explorer-menu.tsx
  2. 6
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -70,12 +70,13 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => {
tooltipId="uploadFileTooltip"
tooltipClasses="text-nowrap"
tooltipText={title}
key={`index-${action}-${placement}-${icon}`}
>
<label
id={action}
data-id={'fileExplorerUploadFile' + action }
className={icon + ' mb-0 remixui_newFile'}
key={index}
key={`index-${action}-${placement}-${icon}`}
>
<input id="fileUpload" data-id="fileExplorerFileUpload" type="file" onChange={(e) => {
e.stopPropagation()
@ -93,6 +94,7 @@ export const FileExplorerMenu = (props: FileExplorerMenuProps) => {
tooltipId={`${action}-${title}-${icon}-${index}`}
tooltipClasses="text-nowrap"
tooltipText={title}
key={`${action}-${title}-${index}`}
>
<span
id={action}

@ -355,6 +355,7 @@ export function Workspace () {
_paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'workspaceCreate'])
hideIconsMenu(!showIconsMenu)
}}
key={`workspacesCreate-fe-ws`}
>
<span
hidden={currentWorkspace === LOCALHOST}
@ -384,6 +385,7 @@ export function Workspace () {
_paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'workspaceDelete'])
hideIconsMenu(!showIconsMenu)
}}
key={`workspacesDelete-fe-ws`}
>
<span
hidden={currentWorkspace === LOCALHOST || currentWorkspace === NO_WORKSPACE}
@ -412,6 +414,7 @@ export function Workspace () {
hideIconsMenu(!showIconsMenu)
}}
data-id='workspaceRename'
key={`workspacesRename-fe-ws`}
>
<span
hidden={currentWorkspace === LOCALHOST || currentWorkspace === NO_WORKSPACE}
@ -441,6 +444,7 @@ export function Workspace () {
_paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'cloneGitRepository'])
hideIconsMenu(!showIconsMenu)
}}
key={`cloneGitRepository-fe-ws`}
>
<span
hidden={currentWorkspace === LOCALHOST}
@ -471,6 +475,7 @@ export function Workspace () {
_paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'workspacesDownload'])
hideIconsMenu(!showIconsMenu)
}}
key={`workspacesDownload-fe-ws`}
>
<span
hidden={currentWorkspace === LOCALHOST || currentWorkspace === NO_WORKSPACE}
@ -500,6 +505,7 @@ export function Workspace () {
_paq.push(['trackEvent', 'fileExplorer', 'workspaceMenu', 'workspacesRestore'])
hideIconsMenu(!showIconsMenu)
}}
key={`workspacesRestore-fe-ws`}
>
<span
hidden={currentWorkspace === LOCALHOST}

Loading…
Cancel
Save