1
0
mirror of synced 2025-12-23 03:44:00 -05:00

unique react key in playground editor buttons (#29836)

* unique React key in playground editor buttons

* second place
This commit is contained in:
Peter Bengtsson
2022-08-11 17:56:58 +02:00
committed by GitHub
parent da337c9ff0
commit cce0416b0d
2 changed files with 2 additions and 0 deletions

View File

@@ -13,6 +13,7 @@ export const CodeLanguagePicker = () => {
<SubNav.Links>
{codeLanguages.map((language) => (
<SubNav.Link
key={language.id}
as={Link}
href={`${routePath}?langId=${language.id}`}
selected={language.id === currentLanguage.id}

View File

@@ -74,6 +74,7 @@ export const Editor: React.FC<Props> = ({ article }) => {
{editorFiles.map((file, i) => {
return (
<button
key={file.fileName}
className={cx('btn-link Link--secondary no-underline mr-2 f6 py-2 px-3', {
'color-bg-subtle': i === selectedFileIndex,
})}