Client - use existing vue method

This commit is contained in:
Sam 2021-10-23 15:41:51 +02:00
parent d78470062d
commit 8efbc4584e
3 changed files with 3 additions and 6 deletions

View File

@ -74,7 +74,7 @@
</template>
<script lang="ts">
import { ComputedRef, computed, defineComponent, ref } from 'vue'
import { ComputedRef, computed, defineComponent, ref, capitalize } from 'vue'
import { useI18n } from 'vue-i18n'
import UserPicture from '@/components/User/UserPicture.vue'
@ -82,7 +82,7 @@
import { IDropdownOption } from '@/types/forms'
import { IAuthUserProfile } from '@/types/user'
import { useStore } from '@/use/useStore'
import { capitalize, getApiUrl } from '@/utils'
import { getApiUrl } from '@/utils'
export default defineComponent({
name: 'NavBar',

View File

@ -110,6 +110,7 @@
defineComponent,
ref,
watch,
capitalize,
onBeforeMount,
} from 'vue'
@ -121,7 +122,6 @@
import { IAuthUserProfile } from '@/types/user'
import { IWorkout } from '@/types/workouts'
import { useStore } from '@/use/useStore'
import { capitalize } from '@/utils'
import { getDateWithTZ } from '@/utils/dates'
export default defineComponent({

View File

@ -51,6 +51,3 @@ export const handleError = (
: `api.ERROR.${removeLastDot(errorMessages)}`
)
}
export const capitalize = (text: string): string =>
text.charAt(0).toUpperCase() + text.slice(1)