@@ -477,24 +477,24 @@ const RequestRideDialog: React.FC<RequestRideDialogProps> = ({
477477 } ) ) ;
478478 } ;
479479
480- const createCustomLocation = async ( name : string ) : Promise < Location > => {
481- console . log ( 'Creating new custom location:' , name ) ;
482-
483- // Create new custom location
484- const payload : Partial < Location > = {
485- name : name . trim ( ) ,
486- shortName : '' ,
487- address : '' , // Empty address for custom locations
488- info : '' ,
489- tag : Tag . CUSTOM ,
490- lat : 0 , // Null coordinates for custom locations
491- lng : 0 ,
492- } ;
493-
494- const response = await axios . post ( '/api/locations/custom' , payload ) ;
495- const created : Location = response . data . data || response . data ;
496- console . log ( 'Created custom location:' , created ) ;
497- return created ;
480+ const createCustomLocation = async ( name : string ) : Promise < LocationType > => {
481+ console . log ( 'Creating new custom location:' , name ) ;
482+
483+ // Create new custom location
484+ const payload : Partial < LocationType > = { // Change Location to LocationType
485+ name : name . trim ( ) ,
486+ shortName : '' ,
487+ address : '' , // Empty address for custom locations
488+ info : '' ,
489+ tag : Tag . CUSTOM ,
490+ lat : 0 , // Null coordinates for custom locations
491+ lng : 0 ,
492+ } ;
493+
494+ const response = await axios . post ( '/api/locations/custom' , payload ) ;
495+ const created : LocationType = response . data . data || response . data ; // Change Location to LocationType
496+ console . log ( 'Created custom location:' , created ) ;
497+ return created ;
498498 } ;
499499
500500 const handleSubmit = async ( ) => {
0 commit comments