Client - register SportImage component

This commit is contained in:
Sam 2021-10-27 17:36:41 +02:00
parent 87ad351d6d
commit 95dec79814
8 changed files with 3 additions and 21 deletions

View File

@ -24,7 +24,7 @@
import Walking from '@/components/Common/Images/SportImage/Walking.vue' import Walking from '@/components/Common/Images/SportImage/Walking.vue'
export default defineComponent({ export default defineComponent({
name: 'SportImg', name: 'SportImage',
components: { components: {
CyclingSport, CyclingSport,
CyclingTransport, CyclingTransport,

View File

@ -25,14 +25,10 @@
import { defineComponent, PropType } from 'vue' import { defineComponent, PropType } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import SportImage from '@/components/Common/Images/SportImage/index.vue'
import { IWorkout } from '@/types/workouts' import { IWorkout } from '@/types/workouts'
export default defineComponent({ export default defineComponent({
name: 'CalendarWorkout', name: 'CalendarWorkout',
components: {
SportImage,
},
props: { props: {
workout: { workout: {
type: Object as PropType<IWorkout>, type: Object as PropType<IWorkout>,

View File

@ -30,14 +30,10 @@
import { PropType, defineComponent } from 'vue' import { PropType, defineComponent } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import SportImage from '@/components/Common/Images/SportImage/index.vue'
import { IRecord } from '@/types/workouts' import { IRecord } from '@/types/workouts'
export default defineComponent({ export default defineComponent({
name: 'RecordsCard', name: 'RecordsCard',
components: {
SportImage,
},
props: { props: {
records: { records: {
type: Object as PropType<IRecord[]>, type: Object as PropType<IRecord[]>,

View File

@ -23,15 +23,11 @@
import { ComputedRef, PropType, computed, defineComponent, inject } from 'vue' import { ComputedRef, PropType, computed, defineComponent, inject } from 'vue'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
import SportImage from '@/components/Common/Images/SportImage/index.vue'
import { ISport, ITranslatedSport } from '@/types/sports' import { ISport, ITranslatedSport } from '@/types/sports'
import { translateSports } from '@/utils/sports' import { translateSports } from '@/utils/sports'
export default defineComponent({ export default defineComponent({
name: 'SportsMenu', name: 'SportsMenu',
components: {
SportImage,
},
props: { props: {
selectedSportIds: { selectedSportIds: {
type: Array as PropType<number[]>, type: Array as PropType<number[]>,

View File

@ -79,7 +79,6 @@
import { Locale, format, formatDistance } from 'date-fns' import { Locale, format, formatDistance } from 'date-fns'
import { PropType, defineComponent, ComputedRef, computed } from 'vue' import { PropType, defineComponent, ComputedRef, computed } from 'vue'
import SportImage from '@/components/Common/Images/SportImage/index.vue'
import StaticMap from '@/components/Common/StaticMap.vue' import StaticMap from '@/components/Common/StaticMap.vue'
import { ROOT_STORE } from '@/store/constants' import { ROOT_STORE } from '@/store/constants'
import { ISport } from '@/types/sports' import { ISport } from '@/types/sports'
@ -93,7 +92,6 @@
name: 'WorkoutCard', name: 'WorkoutCard',
components: { components: {
StaticMap, StaticMap,
SportImage,
}, },
props: { props: {
workout: { workout: {

View File

@ -83,15 +83,11 @@
<script lang="ts"> <script lang="ts">
import { PropType, defineComponent } from 'vue' import { PropType, defineComponent } from 'vue'
import SportImage from '@/components/Common/Images/SportImage/index.vue'
import { ISport } from '@/types/sports' import { ISport } from '@/types/sports'
import { IWorkoutObject } from '@/types/workouts' import { IWorkoutObject } from '@/types/workouts'
export default defineComponent({ export default defineComponent({
name: 'WorkoutCardTitle', name: 'WorkoutCardTitle',
components: {
SportImage,
},
props: { props: {
sport: { sport: {
type: Object as PropType<ISport>, type: Object as PropType<ISport>,

View File

@ -114,7 +114,6 @@
onBeforeMount, onBeforeMount,
} from 'vue' } from 'vue'
import SportImage from '@/components/Common/Images/SportImage/index.vue'
import StaticMap from '@/components/Common/StaticMap.vue' import StaticMap from '@/components/Common/StaticMap.vue'
import NoWorkouts from '@/components/Workouts/NoWorkouts.vue' import NoWorkouts from '@/components/Workouts/NoWorkouts.vue'
import { WORKOUTS_STORE } from '@/store/constants' import { WORKOUTS_STORE } from '@/store/constants'
@ -128,7 +127,6 @@
name: 'WorkoutsList', name: 'WorkoutsList',
components: { components: {
NoWorkouts, NoWorkouts,
SportImage,
StaticMap, StaticMap,
}, },
props: { props: {

View File

@ -3,6 +3,7 @@ import Card from '@/components/Common/Card.vue'
import CustomTextArea from '@/components/Common/CustomTextArea.vue' import CustomTextArea from '@/components/Common/CustomTextArea.vue'
import Dropdown from '@/components/Common/Dropdown.vue' import Dropdown from '@/components/Common/Dropdown.vue'
import ErrorMessage from '@/components/Common/ErrorMessage.vue' import ErrorMessage from '@/components/Common/ErrorMessage.vue'
import SportImage from '@/components/Common/Images/SportImage/index.vue'
import Loader from '@/components/Common/Loader.vue' import Loader from '@/components/Common/Loader.vue'
import Modal from '@/components/Common/Modal.vue' import Modal from '@/components/Common/Modal.vue'
@ -14,4 +15,5 @@ export const customComponents = [
ErrorMessage, ErrorMessage,
Loader, Loader,
Modal, Modal,
SportImage,
] ]