File tree Expand file tree Collapse file tree
apps/frontend/src/modules
song-edit/components/client/context
song-upload/components/client/context Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -57,10 +57,7 @@ export const EditSongProvider = ({
5757
5858 const [ originalData , setOriginalData ] = useState < UploadSongDto | null > ( null ) ;
5959
60- const {
61- register,
62- formState : { errors } ,
63- } = formMethods ;
60+ const { register } = formMethods ;
6461
6562 const router = useRouter ( ) ;
6663
@@ -331,7 +328,7 @@ export const EditSongProvider = ({
331328 instrumentSounds,
332329 setInstrumentSound,
333330 register,
334- errors,
331+ errors : formMethods . formState . errors ,
335332 song,
336333 sendError,
337334 isSubmitting,
Original file line number Diff line number Diff line change @@ -141,10 +141,7 @@ export const UploadSongProvider = ({
141141 } ,
142142 } ) ;
143143
144- const {
145- register,
146- formState : { errors } ,
147- } = formMethods ;
144+ const { register } = formMethods ;
148145
149146 async function submitSongData ( ) : Promise < void > {
150147 // Get song file from state
@@ -327,7 +324,7 @@ export const UploadSongProvider = ({
327324 const formContextValue : UploadSongFormContextType = {
328325 formMethods,
329326 register,
330- errors,
327+ errors : formMethods . formState . errors ,
331328 setFile : setFileHandler ,
332329 setInstrumentSound,
333330 submitSong,
You can’t perform that action at this time.
0 commit comments