Skip to content

Commit 0c2cb0c

Browse files
authored
Fix initialization of profile metrics (#877)
* 🔨 Fix initialization of profile metrics * 🔨 Fix linting warning * 🔨 Call profile updates in parallel * 🔨 Move lang var to commented metric collection
1 parent 7be9f1e commit 0c2cb0c

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

frontend/.env.example

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# -- Frontend --
44
VITE_BASE_URL=localhost:8080
55
VITE_SHORT_BASE_URL=http://localhost:8080/user
6-
# Set true to activate polling for dev server
6+
# Set true to activate polling for dev server
77
VITE_SERVER_WATCH_POLLING=
88
VITE_SERVER_WATCH_INTERVAL=
99
VITE_SERVER_WATCH_BINARY_INTERVAL=
@@ -34,4 +34,3 @@ VITE_DEFAULT_HOUR_FORMAT=12
3434

3535
# You could use a url or a mailto: email address.
3636
VITE_SUPPORT_URL=
37-

frontend/src/App.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ const apiUrl = inject(apiUrlKey);
3333
const route = useRoute();
3434
const routeName = typeof route.name === 'string' ? route.name : '';
3535
const router = useRouter();
36-
const lang = defaultLocale();
3736
3837
const siteNotificationStore = useSiteNotificationStore();
3938
const {
@@ -166,7 +165,7 @@ const onPageLoad = async () => {
166165
resolution: deviceRes,
167166
effective_resolution: effectiveDeviceRes,
168167
user_agent: navigator.userAgent,
169-
locale: lang,
168+
locale: defaultLocale(),
170169
}).json();
171170
172171
const { data } = response;

frontend/src/views/ProfileView.vue

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<script setup lang="ts">
2-
import { inject } from 'vue';
2+
import { inject, onMounted } from 'vue';
33
import { keyByValue } from '@/utils';
44
import { callKey, isFxaAuthKey, fxaEditProfileUrlKey } from '@/keys';
55
import { useI18n } from 'vue-i18n';
@@ -41,6 +41,12 @@ const logout = async () => {
4141
const editProfile = async () => {
4242
window.location.href = fxaEditProfileUrl;
4343
};
44+
45+
// Load calendar and bookings information
46+
onMounted(() => {
47+
calendarStore.fetch(call);
48+
appointmentStore.fetch(call);
49+
});
4450
</script>
4551

4652
<template>

0 commit comments

Comments
 (0)