Client - use existing vue method
This commit is contained in:
parent
d78470062d
commit
8efbc4584e
@ -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',
|
||||
|
@ -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({
|
||||
|
@ -51,6 +51,3 @@ export const handleError = (
|
||||
: `api.ERROR.${removeLastDot(errorMessages)}`
|
||||
)
|
||||
}
|
||||
|
||||
export const capitalize = (text: string): string =>
|
||||
text.charAt(0).toUpperCase() + text.slice(1)
|
||||
|
Loading…
Reference in New Issue
Block a user