unique react key in playground editor buttons (#29836)
* unique React key in playground editor buttons * second place
This commit is contained in:
@@ -13,6 +13,7 @@ export const CodeLanguagePicker = () => {
|
|||||||
<SubNav.Links>
|
<SubNav.Links>
|
||||||
{codeLanguages.map((language) => (
|
{codeLanguages.map((language) => (
|
||||||
<SubNav.Link
|
<SubNav.Link
|
||||||
|
key={language.id}
|
||||||
as={Link}
|
as={Link}
|
||||||
href={`${routePath}?langId=${language.id}`}
|
href={`${routePath}?langId=${language.id}`}
|
||||||
selected={language.id === currentLanguage.id}
|
selected={language.id === currentLanguage.id}
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ export const Editor: React.FC<Props> = ({ article }) => {
|
|||||||
{editorFiles.map((file, i) => {
|
{editorFiles.map((file, i) => {
|
||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
|
key={file.fileName}
|
||||||
className={cx('btn-link Link--secondary no-underline mr-2 f6 py-2 px-3', {
|
className={cx('btn-link Link--secondary no-underline mr-2 f6 py-2 px-3', {
|
||||||
'color-bg-subtle': i === selectedFileIndex,
|
'color-bg-subtle': i === selectedFileIndex,
|
||||||
})}
|
})}
|
||||||
|
|||||||
Reference in New Issue
Block a user