From 36ab898f34b6e812ffe6e0ed28672310b7d46564 Mon Sep 17 00:00:00 2001 From: "jonas-lt@live.dk" Date: Thu, 28 Sep 2023 22:36:19 +0200 Subject: [PATCH] code smells --- modelina-website/src/components/CodeBlock.tsx | 4 ++-- modelina-website/src/pages/docs/[[...slug]].tsx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modelina-website/src/components/CodeBlock.tsx b/modelina-website/src/components/CodeBlock.tsx index 0b61743bd5..96d22cf9c2 100644 --- a/modelina-website/src/components/CodeBlock.tsx +++ b/modelina-website/src/components/CodeBlock.tsx @@ -1,10 +1,10 @@ /* eslint-disable no-useless-escape, security/detect-object-injection, sonarjs/no-duplicate-string */ -import { useState } from 'react'; +import React, { useState } from 'react'; import Highlight from 'react-syntax-highlighter'; import { registerLanguage } from 'lowlight'; import IconClipboard from './icons/Clipboard'; import Caption from './Caption'; -import React from 'react'; + const theme = { hljs: { display: 'inline-block', diff --git a/modelina-website/src/pages/docs/[[...slug]].tsx b/modelina-website/src/pages/docs/[[...slug]].tsx index cf415c707e..3a549ff6fd 100644 --- a/modelina-website/src/pages/docs/[[...slug]].tsx +++ b/modelina-website/src/pages/docs/[[...slug]].tsx @@ -50,7 +50,7 @@ export const getStaticProps: GetStaticProps = async ({ params }) => { */ export const getStaticPaths: GetStaticPaths = async () => { const paths: any[] = [] - for (let [slug, item] of Object.entries(DocsList.unwrapped)) { + for (let slug of Object.keys(DocsList.unwrapped)) { const split = slug.split('/'); let param = { params: {