File tree Expand file tree Collapse file tree 4 files changed +7
-16
lines changed
Expand file tree Collapse file tree 4 files changed +7
-16
lines changed Original file line number Diff line number Diff 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')
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ type FeatureFlip = {
33 [ key : string ] : boolean ;
44} ;
55export 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
Original file line number Diff line number Diff line change 11import { updateClickedDocument } from '@/utils/metrics' ;
2- import { getQueryParamValue , isInPage } from '@/utils/urlsUtils' ;
3- import { use } from 'marked' ;
2+ import { isInPage } from '@/utils/urlsUtils' ;
43import { defineStore } from 'pinia' ;
54import { ref , computed } from 'vue' ;
6- import { useUserStore } from '. /user' ;
5+ import { useUserStore } from '@/stores /user' ;
76
87export 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 } ;
Original file line number Diff line number Diff line change 11import { defineStore } from 'pinia' ;
2- import { type Ref , ref , useId } from 'vue' ;
2+ import { type Ref , ref } from 'vue' ;
33import { getFromStorage , saveToStorage } from '@/utils/storage' ;
44import { getUserAndSession } from '@/utils/auth' ;
5- import { use } from 'marked' ;
65
76type OnboardingState = {
87 hasSeenWelcome : boolean ;
You can’t perform that action at this time.
0 commit comments