Browse Source

chore: lint code to remove unused imports and variables (#9553)

DDDDD12138 5 months ago
parent
commit
79fe175440

+ 0 - 4
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,}$/
 

+ 1 - 3
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<AudioState>('initial')
 
-  const selector = useRef(`play-tooltip-${randomString(4)}`)
   const params = useParams()
   const pathname = usePathname()
   const audio_finished_call = (event: string): any => {

+ 1 - 1
web/app/components/datasets/create/step-two/language-select/index.tsx

@@ -24,7 +24,7 @@ const LanguageSelect: FC<ILanguageSelectProps> = ({
       disabled={disabled}
       htmlContent={
         <div className='w-full py-1'>
-          {languages.filter(language => language.supported).map(({ prompt_name, name }) => (
+          {languages.filter(language => language.supported).map(({ prompt_name }) => (
             <div
               key={prompt_name}
               className='py-2 px-3 mx-1 flex items-center gap-2 hover:bg-gray-100 rounded-lg cursor-pointer text-gray-700 text-sm'