Client - use existing vue method
This commit is contained in:
parent
d78470062d
commit
8efbc4584e
@ -74,7 +74,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { ComputedRef, computed, defineComponent, ref } from 'vue'
|
import { ComputedRef, computed, defineComponent, ref, capitalize } from 'vue'
|
||||||
import { useI18n } from 'vue-i18n'
|
import { useI18n } from 'vue-i18n'
|
||||||
|
|
||||||
import UserPicture from '@/components/User/UserPicture.vue'
|
import UserPicture from '@/components/User/UserPicture.vue'
|
||||||
@ -82,7 +82,7 @@
|
|||||||
import { IDropdownOption } from '@/types/forms'
|
import { IDropdownOption } from '@/types/forms'
|
||||||
import { IAuthUserProfile } from '@/types/user'
|
import { IAuthUserProfile } from '@/types/user'
|
||||||
import { useStore } from '@/use/useStore'
|
import { useStore } from '@/use/useStore'
|
||||||
import { capitalize, getApiUrl } from '@/utils'
|
import { getApiUrl } from '@/utils'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'NavBar',
|
name: 'NavBar',
|
||||||
|
@ -110,6 +110,7 @@
|
|||||||
defineComponent,
|
defineComponent,
|
||||||
ref,
|
ref,
|
||||||
watch,
|
watch,
|
||||||
|
capitalize,
|
||||||
onBeforeMount,
|
onBeforeMount,
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
|
|
||||||
@ -121,7 +122,6 @@
|
|||||||
import { IAuthUserProfile } from '@/types/user'
|
import { IAuthUserProfile } from '@/types/user'
|
||||||
import { IWorkout } from '@/types/workouts'
|
import { IWorkout } from '@/types/workouts'
|
||||||
import { useStore } from '@/use/useStore'
|
import { useStore } from '@/use/useStore'
|
||||||
import { capitalize } from '@/utils'
|
|
||||||
import { getDateWithTZ } from '@/utils/dates'
|
import { getDateWithTZ } from '@/utils/dates'
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
|
@ -51,6 +51,3 @@ export const handleError = (
|
|||||||
: `api.ERROR.${removeLastDot(errorMessages)}`
|
: `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