Client - refactoring (rename auth user store)

This commit is contained in:
Sam
2021-11-03 10:41:53 +01:00
parent 3a1245a2e0
commit f97c7ae4d0
66 changed files with 406 additions and 368 deletions

View File

@ -15,7 +15,11 @@
import { computed, defineComponent, ComputedRef } from 'vue'
import WorkoutEdition from '@/components/Workout/WorkoutEdition.vue'
import { SPORTS_STORE, USER_STORE, WORKOUTS_STORE } from '@/store/constants'
import {
AUTH_USER_STORE,
SPORTS_STORE,
WORKOUTS_STORE,
} from '@/store/constants'
import { ISport } from '@/types/sports'
import { IUserProfile } from '@/types/user'
import { IWorkoutData } from '@/types/workouts'
@ -32,7 +36,7 @@
() => store.getters[SPORTS_STORE.GETTERS.SPORTS]
)
const authUser: ComputedRef<IUserProfile> = computed(
() => store.getters[USER_STORE.GETTERS.AUTH_USER_PROFILE]
() => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]
)
const workoutData: ComputedRef<IWorkoutData> = computed(
() => store.getters[WORKOUTS_STORE.GETTERS.WORKOUT_DATA]

View File

@ -22,7 +22,11 @@
import { useRoute } from 'vue-router'
import WorkoutEdition from '@/components/Workout/WorkoutEdition.vue'
import { SPORTS_STORE, USER_STORE, WORKOUTS_STORE } from '@/store/constants'
import {
AUTH_USER_STORE,
SPORTS_STORE,
WORKOUTS_STORE,
} from '@/store/constants'
import { ISport } from '@/types/sports'
import { IUserProfile } from '@/types/user'
import { IWorkoutData } from '@/types/workouts'
@ -44,7 +48,7 @@
})
const authUser: ComputedRef<IUserProfile> = computed(
() => store.getters[USER_STORE.GETTERS.AUTH_USER_PROFILE]
() => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]
)
const sports: ComputedRef<ISport[]> = computed(
() => store.getters[SPORTS_STORE.GETTERS.SPORTS]

View File

@ -55,7 +55,11 @@
import WorkoutDetail from '@/components/Workout/WorkoutDetail/index.vue'
import WorkoutNotes from '@/components/Workout/WorkoutNotes.vue'
import WorkoutSegments from '@/components/Workout/WorkoutSegments.vue'
import { SPORTS_STORE, USER_STORE, WORKOUTS_STORE } from '@/store/constants'
import {
AUTH_USER_STORE,
SPORTS_STORE,
WORKOUTS_STORE,
} from '@/store/constants'
import { ISport } from '@/types/sports'
import { IUserProfile } from '@/types/user'
import { IWorkoutData, IWorkoutPayload, TCoordinates } from '@/types/workouts'
@ -92,7 +96,7 @@
() => store.getters[WORKOUTS_STORE.GETTERS.WORKOUT_DATA]
)
const authUser: ComputedRef<IUserProfile> = computed(
() => store.getters[USER_STORE.GETTERS.AUTH_USER_PROFILE]
() => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]
)
const sports: ComputedRef<ISport[]> = computed(
() => store.getters[SPORTS_STORE.GETTERS.SPORTS]

View File

@ -32,7 +32,7 @@
import WorkoutsFilters from '@/components/Workouts/WorkoutsFilters.vue'
import WorkoutsList from '@/components/Workouts/WorkoutsList.vue'
import { USER_STORE, SPORTS_STORE } from '@/store/constants'
import { AUTH_USER_STORE, SPORTS_STORE } from '@/store/constants'
import { ISport, ITranslatedSport } from '@/types/sports'
import { IUserProfile } from '@/types/user'
import { useStore } from '@/use/useStore'
@ -48,7 +48,7 @@
const { t } = useI18n()
const store = useStore()
const authUser: ComputedRef<IUserProfile> = computed(
() => store.getters[USER_STORE.GETTERS.AUTH_USER_PROFILE]
() => store.getters[AUTH_USER_STORE.GETTERS.AUTH_USER_PROFILE]
)
const sports: ComputedRef<ISport[]> = computed(
() => store.getters[SPORTS_STORE.GETTERS.SPORTS]