Skip to content

Commit 2e4553b

Browse files
lint
1 parent 1130129 commit 2e4553b

File tree

4 files changed

+7
-16
lines changed

4 files changed

+7
-16
lines changed

src/components/NavComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const handle_nav_bookmarks = () => {
122122
class="mx-0 px-0"
123123
v-if="isWorkshopFeatureEnabled"
124124
target="_blank"
125-
:href="metricStore.getWorkshopFormUrl"
125+
:href="metricStore.getWorkshopFormUrl()"
126126
>
127127
<span class="item-name router-link-form has-text-success mx-1 px-1 pr-4 is-size-6">{{
128128
$t('nav.workshopForm')

src/stores/featureFlip.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ type FeatureFlip = {
33
[key: string]: boolean;
44
};
55
export const useFeatureFlipStore = defineStore('featureFlip', () => {
6-
const isDevEnvironment = import.meta.env.VITE_ENVIRONMENT.trim().includes('dev');
6+
const isDevEnvironment = (import.meta.env.VITE_ENVIRONMENT || '').trim().includes('dev');
77
const featureFlip: FeatureFlip = {
88
tutor: true,
99
microlearning: isDevEnvironment

src/stores/metrics.ts

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,17 @@
11
import { updateClickedDocument } from '@/utils/metrics';
2-
import { getQueryParamValue, isInPage } from '@/utils/urlsUtils';
3-
import { use } from 'marked';
2+
import { isInPage } from '@/utils/urlsUtils';
43
import { defineStore } from 'pinia';
54
import { ref, computed } from 'vue';
6-
import { useUserStore } from './user';
5+
import { useUserStore } from '@/stores/user';
76

87
export const useMetricsStore = defineStore('metrics', () => {
98
const userId = ref<string | null>(localStorage.getItem('userId'));
109

1110
const getUserId = computed(() => userId.value);
1211

13-
const getWorkshopFormUrl = async () => {
12+
const getWorkshopFormUrl = () => {
1413
const userStore = useUserStore();
15-
let userId = userStore.userId;
16-
17-
if (!userId) {
18-
const uidAndSession = await userStore.setUserIdAndSessionId(
19-
getQueryParamValue('referer') || ''
20-
);
21-
userId = uidAndSession.userId;
22-
}
14+
const userId = userStore.userId;
2315

2416
return `https://docs.google.com/forms/d/e/1FAIpQLSeUf3GQXt3LsZD24Z3fGkwUE-qhAXF2jkem9zbPnAbnOrReDQ/viewform?usp=pp_url&entry.736499817=${userId}`;
2517
};

src/stores/user.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { defineStore } from 'pinia';
2-
import { type Ref, ref, useId } from 'vue';
2+
import { type Ref, ref } from 'vue';
33
import { getFromStorage, saveToStorage } from '@/utils/storage';
44
import { getUserAndSession } from '@/utils/auth';
5-
import { use } from 'marked';
65

76
type OnboardingState = {
87
hasSeenWelcome: boolean;

0 commit comments

Comments
 (0)