Client - minor fix
This commit is contained in:
		@@ -182,7 +182,7 @@
 | 
				
			|||||||
  import { WORKOUTS_STORE } from '@/store/constants'
 | 
					  import { WORKOUTS_STORE } from '@/store/constants'
 | 
				
			||||||
  import { IPagination } from '@/types/api'
 | 
					  import { IPagination } from '@/types/api'
 | 
				
			||||||
  import { ITranslatedSport } from '@/types/sports'
 | 
					  import { ITranslatedSport } from '@/types/sports'
 | 
				
			||||||
  import { IUserProfile } from '@/types/user'
 | 
					  import { IAuthUserProfile } from '@/types/user'
 | 
				
			||||||
  import { IWorkout, TWorkoutsPayload } from '@/types/workouts'
 | 
					  import { IWorkout, TWorkoutsPayload } from '@/types/workouts'
 | 
				
			||||||
  import { useStore } from '@/use/useStore'
 | 
					  import { useStore } from '@/use/useStore'
 | 
				
			||||||
  import { getQuery, sortList, workoutsPayloadKeys } from '@/utils/api'
 | 
					  import { getQuery, sortList, workoutsPayloadKeys } from '@/utils/api'
 | 
				
			||||||
@@ -192,7 +192,7 @@
 | 
				
			|||||||
  import { defaultOrder } from '@/utils/workouts'
 | 
					  import { defaultOrder } from '@/utils/workouts'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  interface Props {
 | 
					  interface Props {
 | 
				
			||||||
    user: IUserProfile
 | 
					    user: IAuthUserProfile
 | 
				
			||||||
    sports: ITranslatedSport[]
 | 
					    sports: ITranslatedSport[]
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  const props = defineProps<Props>()
 | 
					  const props = defineProps<Props>()
 | 
				
			||||||
@@ -258,7 +258,7 @@
 | 
				
			|||||||
      ...payload,
 | 
					      ...payload,
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    Object.entries(convertedPayload).map((entry) => {
 | 
					    Object.entries(convertedPayload).map((entry) => {
 | 
				
			||||||
      if (entry[0].match('speed|distance')) {
 | 
					      if (entry[0].match('speed|distance') && entry[1]) {
 | 
				
			||||||
        convertedPayload[entry[0]] = convertDistance(+entry[1], 'mi', 'km')
 | 
					        convertedPayload[entry[0]] = convertDistance(+entry[1], 'mi', 'km')
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    })
 | 
					    })
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user