From 79fe175440c5633bef3939c1e0c573c66ae4856e Mon Sep 17 00:00:00 2001 From: DDDDD12138 <43703884+DDDDD12138@users.noreply.github.com> Date: Mon, 21 Oct 2024 19:04:54 +0800 Subject: [PATCH] chore: lint code to remove unused imports and variables (#9553) --- web/app/account/account-page/index.tsx | 4 ---- web/app/components/base/audio-btn/index.tsx | 4 +--- .../datasets/create/step-two/language-select/index.tsx | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/web/app/account/account-page/index.tsx b/web/app/account/account-page/index.tsx index b42b481eba..71540ce3b1 100644 --- a/web/app/account/account-page/index.tsx +++ b/web/app/account/account-page/index.tsx @@ -23,10 +23,6 @@ const titleClassName = ` const descriptionClassName = ` mt-1 text-xs font-normal text-gray-500 ` -const inputClassName = ` - mt-2 w-full px-3 py-2 bg-gray-100 rounded - text-sm font-normal text-gray-800 -` const validPassword = /^(?=.*[a-zA-Z])(?=.*\d).{8,}$/ diff --git a/web/app/components/base/audio-btn/index.tsx b/web/app/components/base/audio-btn/index.tsx index d57c79b571..593411ed4d 100644 --- a/web/app/components/base/audio-btn/index.tsx +++ b/web/app/components/base/audio-btn/index.tsx @@ -1,10 +1,9 @@ 'use client' -import { useRef, useState } from 'react' +import { useState } from 'react' import { t } from 'i18next' import { useParams, usePathname } from 'next/navigation' import s from './style.module.css' import Tooltip from '@/app/components/base/tooltip' -import { randomString } from '@/utils' import Loading from '@/app/components/base/loading' import { AudioPlayerManager } from '@/app/components/base/audio-btn/audio.player.manager' @@ -28,7 +27,6 @@ const AudioBtn = ({ }: AudioBtnProps) => { const [audioState, setAudioState] = useState('initial') - const selector = useRef(`play-tooltip-${randomString(4)}`) const params = useParams() const pathname = usePathname() const audio_finished_call = (event: string): any => { diff --git a/web/app/components/datasets/create/step-two/language-select/index.tsx b/web/app/components/datasets/create/step-two/language-select/index.tsx index fab2bb1c71..41f3e0abb5 100644 --- a/web/app/components/datasets/create/step-two/language-select/index.tsx +++ b/web/app/components/datasets/create/step-two/language-select/index.tsx @@ -24,7 +24,7 @@ const LanguageSelect: FC = ({ disabled={disabled} htmlContent={
- {languages.filter(language => language.supported).map(({ prompt_name, name }) => ( + {languages.filter(language => language.supported).map(({ prompt_name }) => (