wwf
3 天以前 a430284aa21e3ae1f0d5654e55b2ad2852519cc2
app/components/base/audio-btn/index.tsx
@@ -29,7 +29,7 @@
  const params = useParams()
  const pathname = usePathname()
  const audio_finished_call = (event: string): void => {
  const audio_finished_call = (event: string): any => {
    switch (event) {
      case 'ended':
        setAudioState('ended')
@@ -87,18 +87,18 @@
      >
        <button
          disabled={audioState === 'loading'}
          className={`box-border flex h-6 w-6 cursor-pointer items-center justify-center ${isAudition ? 'p-0.5' : 'rounded-md bg-white p-0'}`}
          className={`box-border w-6 h-6 flex items-center justify-center cursor-pointer ${isAudition ? 'p-0.5' : 'p-0 rounded-md bg-white'}`}
          onClick={handleToggle}
        >
          {audioState === 'loading'
            ? (
              <div className='flex h-full w-full items-center justify-center rounded-md'>
              <div className='w-full h-full rounded-md flex items-center justify-center'>
                <Loading />
              </div>
            )
            : (
              <div className={'flex h-full w-full items-center justify-center rounded-md hover:bg-gray-50'}>
                <div className={`h-4 w-4 ${(audioState === 'playing') ? s.pauseIcon : s.playIcon}`}></div>
              <div className={`w-full h-full rounded-md flex items-center justify-center ${!isAudition ? 'hover:bg-gray-50' : 'hover:bg-gray-50'}`}>
                <div className={`w-4 h-4 ${(audioState === 'playing') ? s.pauseIcon : s.playIcon}`}></div>
              </div>
            )}
        </button>