Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

chore(nc-gui): lint

Ramesh Mane0ce9051636e2
diff --git a/packages/nc-gui/components/auth/onboarding/Question/index.vue b/packages/nc-gui/components/auth/onboarding/Question/index.vue
index 213ff060de..62b78b41ea 100644
--- a/packages/nc-gui/components/auth/onboarding/Question/index.vue
+++ b/packages/nc-gui/components/auth/onboarding/Question/index.vue
@@ -58,12 +58,12 @@ const isOptionSelected = (option: OnboardingOptionType) => {
:index="index"
:total-options="options.length"
:icon-size="question.iconSize"
- @click="onSelectOption(option, question, questionIndex)"
:class="{
'!justify-center': !anyOptionHasIcon,
'nc-selected': isOptionSelected(option),
'nc-has-icon-bg-color': anyOptionHasBgColor,
}"
+ @click="onSelectOption(option, question, questionIndex)"
/>
</template>
</div>
diff --git a/packages/nc-gui/components/auth/onboarding/index.vue b/packages/nc-gui/components/auth/onboarding/index.vue
index 545cd9d94e..ee8f6c4930 100644
--- a/packages/nc-gui/components/auth/onboarding/index.vue
+++ b/packages/nc-gui/components/auth/onboarding/index.vue
@@ -48,9 +48,9 @@ onMounted(() => {
<Transition :name="transitionName ?? ''" mode="out-in">
<AuthOnboardingQuestion
:key="stepper.index.value"
+ :ref="onSelectRef"
:question="visibleQuestion"
:question-index="stepper.index.value"
- :ref="onSelectRef"
/>
</Transition>
</div>
diff --git a/packages/nc-gui/composables/useOnboardingFlow.ts b/packages/nc-gui/composables/useOnboardingFlow.ts
index 0a7fae5300..dd079e8375 100644
--- a/packages/nc-gui/composables/useOnboardingFlow.ts
+++ b/packages/nc-gui/composables/useOnboardingFlow.ts
@@ -44,14 +44,14 @@ export interface OnboardingOptionType {
* Default `left`
*/
iconPosition?: 'left' | 'right'
- /**
- * `resetOnSelect` will be helpful if option is `None of the above` or `Other` to reset previous selection if user select this option
- */
-
/**
* Allow multiple icons to be shown in the option
*/
icons?: OnboardingOptionIconType[]
+ /**
+ * `resetOnSelect` will be helpful if option is `None of the above` or `Other` to reset previous selection if user select this option
+ */
+
resetOnSelect?: boolean
}
@@ -697,7 +697,7 @@ export const useOnboardingFlow = createSharedComposable(() => {
},
},
/*
- // Commenting for now
+ // Commenting for now, we need this later
{
id: 8,
question: 'How do you want to build your database?',
@@ -778,20 +778,11 @@ export const useOnboardingFlow = createSharedComposable(() => {
const stepper = useStepper(steps)
const lastVisibleQuestionIndex = computed(() => {
- // const index = (stepper.index.value + 1) * 2 - 1
- const index = stepper.index.value
-
- const question = questions.value[index]!
-
- // if (!question || ncIsUndefined(formState.value[question.id])) {
- // return index - 1
- // }
-
- return index
+ return stepper.index.value
})
const visibleQuestions = computed(() => {
- let currentVisibleQuestions: OnboardingQuestionType[] = []
+ const currentVisibleQuestions: OnboardingQuestionType[] = []
const index = (stepper.index.value + 1) * 2 - 1
const question = questions.value[index]!
@@ -886,15 +877,6 @@ export const useOnboardingFlow = createSharedComposable(() => {
stepper.goToNext()
})
}
- /*
- else if (question.inputType === 'multiSelect') {
- if ((formState.value[question.id]?.length ?? 0) >= (question.minSelection ?? 1)) {
- ncDelay(500).then(() => {
- stepper.goToNext()
- })
- }
- }
- */
}
/**
diff --git a/packages/nc-gui/pages/signup/[[token]].vue b/packages/nc-gui/pages/signup/[[token]].vue
index 896db291eb..07491832ef 100644
--- a/packages/nc-gui/pages/signup/[[token]].vue
+++ b/packages/nc-gui/pages/signup/[[token]].vue
@@ -89,7 +89,7 @@ async function signUp() {
continueAfterOnboardingFlow = 'nc' + `/${base.id}`
if (table?.id) {
- continueAfterOnboardingFlow = continueAfterOnboardingFlow + `/${table.id}`
+ continueAfterOnboardingFlow = `${continueAfterOnboardingFlow}/${table.id}`
}
}