Commit 3d91d032 authored by StyleZhang's avatar StyleZhang

fix ui

parent fe0cb6f8
...@@ -55,6 +55,9 @@ const VoiceInput = ({ ...@@ -55,6 +55,9 @@ const VoiceInput = ({
recorder.current.stop() recorder.current.stop()
drawRecordId.current && cancelAnimationFrame(drawRecordId.current) drawRecordId.current && cancelAnimationFrame(drawRecordId.current)
drawRecordId.current = null drawRecordId.current = null
const canvas = canvasRef.current!
const ctx = ctxRef.current!
ctx.clearRect(0, 0, canvas.width, canvas.height)
// const wavBlob = recorder.current.getWAVBlob() // const wavBlob = recorder.current.getWAVBlob()
// const wavFile = new File([wavBlob], 'audio.wav', { type: 'audio/wav' }) // const wavFile = new File([wavBlob], 'audio.wav', { type: 'audio/wav' })
// onConverted('') // onConverted('')
...@@ -104,9 +107,7 @@ const VoiceInput = ({ ...@@ -104,9 +107,7 @@ const VoiceInput = ({
return ( return (
<div className={cn(s.wrapper, 'absolute inset-0 rounded-xl')}> <div className={cn(s.wrapper, 'absolute inset-0 rounded-xl')}>
<div className='absolute inset-[1.5px] flex items-center pl-[14.5px] pr-[6.5px] py-[14px] bg-primary-25 rounded-[10.5px] overflow-hidden'> <div className='absolute inset-[1.5px] flex items-center pl-[14.5px] pr-[6.5px] py-[14px] bg-primary-25 rounded-[10.5px] overflow-hidden'>
{ <canvas id='voice-input-record' className='absolute left-0 bottom-0 w-full h-4' />
startRecord && <canvas id='voice-input-record' className='absolute left-0 bottom-0 w-full h-4' />
}
{ {
startConvert && <Loading02 className='animate-spin mr-2 w-4 h-4 text-primary-700' /> startConvert && <Loading02 className='animate-spin mr-2 w-4 h-4 text-primary-700' />
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment