fix(video-viewer): handle undefined video status in radio group

This commit is contained in:
icarus 2025-10-12 04:33:23 +08:00
parent 8b875935d0
commit 953f0f4a2f

View File

@ -17,7 +17,7 @@ export const VideoViewer = ({ video: _video }: VideoProps) => {
{/* For test */}
<RadioGroup
label="Status"
value={video?.status}
value={video?.status ?? 'undefined'}
onValueChange={(v) => {
if (v !== 'undefined') setVideo({ ..._video, status: v as VideoStatus, progress: 60 } as Video)
else setVideo(undefined)