Skip to content

Commit

Permalink
fix(docs): cover sonarcloud code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgrasset committed Oct 22, 2023
1 parent 40f9ace commit f98e4f9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion docs/src/components/platforms/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import Link from '@docusaurus/Link';
import clsx from 'clsx';
import PropTypes from 'prop-types';
import React from 'react';

import styles from './styles.module.css';
Expand All @@ -23,6 +24,11 @@ const PlatformList = [
},
];

Platform.propTypes = {
icon: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
};

function Platform({ icon, name }) {
const page = name.toLowerCase().replaceAll(' ', '-');
return (
Expand All @@ -41,7 +47,7 @@ export default function Index() {
<div className="container">
<div className={clsx(['row',styles.platformsWrapper])}>
{PlatformList.map((props, idx) => (
<Platform key={idx} {...props} />
<Platform key={`${props.page}-${idx}`} {...props} />
))}
</div>
</div>
Expand Down

0 comments on commit f98e4f9

Please sign in to comment.