From 828b830aa8396a58654d3427e10596cddfa588cd Mon Sep 17 00:00:00 2001 From: Pranav C Date: Mon, 1 Aug 2022 20:48:50 +0530 Subject: [PATCH] refactor(gui-v2): group module imports Signed-off-by: Pranav C --- .../nc-gui-v2/components/smartsheet-toolbar/DeleteTable.vue | 1 - packages/nc-gui-v2/components/smartsheet-toolbar/ShareView.vue | 2 +- .../nc-gui-v2/components/smartsheet-toolbar/SharedViewList.vue | 3 +-- packages/nc-gui-v2/components/tabs/Smartsheet.vue | 3 +-- packages/nc-gui-v2/composables/useDashboard.ts | 2 +- 5 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/nc-gui-v2/components/smartsheet-toolbar/DeleteTable.vue b/packages/nc-gui-v2/components/smartsheet-toolbar/DeleteTable.vue index bf3d4622c1..44b626f6d7 100644 --- a/packages/nc-gui-v2/components/smartsheet-toolbar/DeleteTable.vue +++ b/packages/nc-gui-v2/components/smartsheet-toolbar/DeleteTable.vue @@ -17,4 +17,3 @@ const { deleteTable } = useDeleteTable() - diff --git a/packages/nc-gui-v2/components/smartsheet-toolbar/ShareView.vue b/packages/nc-gui-v2/components/smartsheet-toolbar/ShareView.vue index 01ea64dd96..60fb460171 100644 --- a/packages/nc-gui-v2/components/smartsheet-toolbar/ShareView.vue +++ b/packages/nc-gui-v2/components/smartsheet-toolbar/ShareView.vue @@ -4,7 +4,7 @@ import { ViewTypes } from 'nocodb-sdk' import { computed } from 'vue' import { useToast } from 'vue-toastification' import { useNuxtApp } from '#app' -import { useSmartsheetStoreOrThrow } from '~/composables/useSmartsheetStore' +import { useSmartsheetStoreOrThrow } from '#imports' import { extractSdkResponseErrorMsg } from '~/utils/errorUtils' import MdiOpenInNewIcon from '~icons/mdi/open-in-new' import MdiCopyIcon from '~icons/mdi/content-copy' diff --git a/packages/nc-gui-v2/components/smartsheet-toolbar/SharedViewList.vue b/packages/nc-gui-v2/components/smartsheet-toolbar/SharedViewList.vue index 95501a97da..b0ec31863e 100644 --- a/packages/nc-gui-v2/components/smartsheet-toolbar/SharedViewList.vue +++ b/packages/nc-gui-v2/components/smartsheet-toolbar/SharedViewList.vue @@ -3,8 +3,7 @@ import { useClipboard } from '@vueuse/core' import { ViewTypes } from 'nocodb-sdk' import { useToast } from 'vue-toastification' import { useRoute } from '#app' -import { onMounted } from '#imports' -import { useSmartsheetStoreOrThrow } from '~/composables/useSmartsheetStore' +import { onMounted, useSmartsheetStoreOrThrow } from '#imports' import { extractSdkResponseErrorMsg } from '~/utils/errorUtils' import MdiVisibilityOnIcon from '~icons/mdi/visibility' import MdiVisibilityOffIcon from '~icons/mdi/visibility-off' diff --git a/packages/nc-gui-v2/components/tabs/Smartsheet.vue b/packages/nc-gui-v2/components/tabs/Smartsheet.vue index ae6256d468..6465cac6c0 100644 --- a/packages/nc-gui-v2/components/tabs/Smartsheet.vue +++ b/packages/nc-gui-v2/components/tabs/Smartsheet.vue @@ -3,8 +3,7 @@ import type { ColumnType, TableType, ViewType } from 'nocodb-sdk' import { ViewTypes } from 'nocodb-sdk' import type { Ref } from 'vue' import SmartsheetGrid from '../smartsheet/Grid.vue' -import { computed, inject, provide, useMetas, watch, watchEffect } from '#imports' -import { useProvideSmartsheetStore } from '~/composables/useSmartsheetStore' +import { computed, inject, provide, useMetas, useProvideSmartsheetStore, watch, watchEffect } from '#imports' import { ActiveViewInj, FieldsInj, IsLockedInj, MetaInj, ReloadViewDataHookInj, RightSidebarInj, TabMetaInj } from '~/context' import type { TabItem } from '~/composables' diff --git a/packages/nc-gui-v2/composables/useDashboard.ts b/packages/nc-gui-v2/composables/useDashboard.ts index 7cde85e020..e9a93e0c70 100644 --- a/packages/nc-gui-v2/composables/useDashboard.ts +++ b/packages/nc-gui-v2/composables/useDashboard.ts @@ -1,4 +1,4 @@ -export default () => { +export function useDashboard() { const route = useRoute() const dashboardUrl = computed(() => { // todo: test in different scenarios