Client - refactor
This commit is contained in:
@ -85,7 +85,7 @@
|
||||
import UserStatsCards from '@/components/Dashboard/UserStatsCards/index.vue'
|
||||
import { SPORTS_STORE, USER_STORE, WORKOUTS_STORE } from '@/store/constants'
|
||||
import { ISport } from '@/types/sports'
|
||||
import { IAuthUserProfile } from '@/types/user'
|
||||
import { IUserProfile } from '@/types/user'
|
||||
import { useStore } from '@/use/useStore'
|
||||
|
||||
export default defineComponent({
|
||||
@ -99,7 +99,7 @@
|
||||
},
|
||||
setup() {
|
||||
const store = useStore()
|
||||
const authUser: ComputedRef<IAuthUserProfile> = computed(
|
||||
const authUser: ComputedRef<IUserProfile> = computed(
|
||||
() => store.getters[USER_STORE.GETTERS.AUTH_USER_PROFILE]
|
||||
)
|
||||
const sports: ComputedRef<ISport[]> = computed(
|
||||
|
@ -8,14 +8,14 @@
|
||||
import { computed, ComputedRef, defineComponent } from 'vue'
|
||||
|
||||
import { USER_STORE } from '@/store/constants'
|
||||
import { IAuthUserProfile } from '@/types/user'
|
||||
import { IUserProfile } from '@/types/user'
|
||||
import { useStore } from '@/use/useStore'
|
||||
|
||||
export default defineComponent({
|
||||
name: 'ProfileView',
|
||||
setup() {
|
||||
const store = useStore()
|
||||
const authUser: ComputedRef<IAuthUserProfile> = computed(
|
||||
const authUser: ComputedRef<IUserProfile> = computed(
|
||||
() => store.getters[USER_STORE.GETTERS.AUTH_USER_PROFILE]
|
||||
)
|
||||
return { authUser }
|
||||
|
@ -23,7 +23,7 @@
|
||||
import NoWorkouts from '@/components/Workouts/NoWorkouts.vue'
|
||||
import { USER_STORE, SPORTS_STORE } from '@/store/constants'
|
||||
import { ISport } from '@/types/sports'
|
||||
import { IAuthUserProfile } from '@/types/user'
|
||||
import { IUserProfile } from '@/types/user'
|
||||
import { useStore } from '@/use/useStore'
|
||||
|
||||
export default defineComponent({
|
||||
@ -34,7 +34,7 @@
|
||||
},
|
||||
setup() {
|
||||
const store = useStore()
|
||||
const authUser: ComputedRef<IAuthUserProfile> = computed(
|
||||
const authUser: ComputedRef<IUserProfile> = computed(
|
||||
() => store.getters[USER_STORE.GETTERS.AUTH_USER_PROFILE]
|
||||
)
|
||||
const sports: ComputedRef<ISport[]> = computed(() =>
|
||||
|
@ -17,7 +17,7 @@
|
||||
import WorkoutEdition from '@/components/Workout/WorkoutEdition.vue'
|
||||
import { SPORTS_STORE, USER_STORE, WORKOUTS_STORE } from '@/store/constants'
|
||||
import { ISport } from '@/types/sports'
|
||||
import { IAuthUserProfile } from '@/types/user'
|
||||
import { IUserProfile } from '@/types/user'
|
||||
import { IWorkoutData } from '@/types/workouts'
|
||||
import { useStore } from '@/use/useStore'
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
const sports: ComputedRef<ISport[]> = computed(
|
||||
() => store.getters[SPORTS_STORE.GETTERS.SPORTS]
|
||||
)
|
||||
const authUser: ComputedRef<IAuthUserProfile> = computed(
|
||||
const authUser: ComputedRef<IUserProfile> = computed(
|
||||
() => store.getters[USER_STORE.GETTERS.AUTH_USER_PROFILE]
|
||||
)
|
||||
const workoutData: ComputedRef<IWorkoutData> = computed(
|
||||
|
@ -24,7 +24,7 @@
|
||||
import WorkoutEdition from '@/components/Workout/WorkoutEdition.vue'
|
||||
import { SPORTS_STORE, USER_STORE, WORKOUTS_STORE } from '@/store/constants'
|
||||
import { ISport } from '@/types/sports'
|
||||
import { IAuthUserProfile } from '@/types/user'
|
||||
import { IUserProfile } from '@/types/user'
|
||||
import { IWorkoutData } from '@/types/workouts'
|
||||
import { useStore } from '@/use/useStore'
|
||||
|
||||
@ -43,7 +43,7 @@
|
||||
})
|
||||
})
|
||||
|
||||
const authUser: ComputedRef<IAuthUserProfile> = computed(
|
||||
const authUser: ComputedRef<IUserProfile> = computed(
|
||||
() => store.getters[USER_STORE.GETTERS.AUTH_USER_PROFILE]
|
||||
)
|
||||
const sports: ComputedRef<ISport[]> = computed(
|
||||
|
@ -57,7 +57,7 @@
|
||||
import WorkoutSegments from '@/components/Workout/WorkoutSegments.vue'
|
||||
import { SPORTS_STORE, USER_STORE, WORKOUTS_STORE } from '@/store/constants'
|
||||
import { ISport } from '@/types/sports'
|
||||
import { IAuthUserProfile } from '@/types/user'
|
||||
import { IUserProfile } from '@/types/user'
|
||||
import { IWorkoutData, IWorkoutPayload, TCoordinates } from '@/types/workouts'
|
||||
import { useStore } from '@/use/useStore'
|
||||
|
||||
@ -91,7 +91,7 @@
|
||||
const workoutData: ComputedRef<IWorkoutData> = computed(
|
||||
() => store.getters[WORKOUTS_STORE.GETTERS.WORKOUT_DATA]
|
||||
)
|
||||
const authUser: ComputedRef<IAuthUserProfile> = computed(
|
||||
const authUser: ComputedRef<IUserProfile> = computed(
|
||||
() => store.getters[USER_STORE.GETTERS.AUTH_USER_PROFILE]
|
||||
)
|
||||
const sports: ComputedRef<ISport[]> = computed(
|
||||
|
@ -38,7 +38,7 @@
|
||||
import WorkoutsList from '@/components/Workouts/WorkoutsList.vue'
|
||||
import { USER_STORE, SPORTS_STORE } from '@/store/constants'
|
||||
import { ISport, ITranslatedSport } from '@/types/sports'
|
||||
import { IAuthUserProfile } from '@/types/user'
|
||||
import { IUserProfile } from '@/types/user'
|
||||
import { useStore } from '@/use/useStore'
|
||||
import { translateSports } from '@/utils/sports'
|
||||
|
||||
@ -51,7 +51,7 @@
|
||||
setup() {
|
||||
const { t } = useI18n()
|
||||
const store = useStore()
|
||||
const authUser: ComputedRef<IAuthUserProfile> = computed(
|
||||
const authUser: ComputedRef<IUserProfile> = computed(
|
||||
() => store.getters[USER_STORE.GETTERS.AUTH_USER_PROFILE]
|
||||
)
|
||||
const sports: ComputedRef<ISport[]> = computed(
|
||||
|
Reference in New Issue
Block a user