Skip to content

Commit

Permalink
fix(docs): cover sonarcloud code smells (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
louisgrasset authored Oct 22, 2023
1 parent dea6f7d commit 7a0252a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions 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,13 @@ const PlatformList = [
},
];

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

PlatformList.propTypes = Array.from(Platform.propTypes);

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

0 comments on commit 7a0252a

Please sign in to comment.