Review fixes

This commit is contained in:
Fayaz Ahmed
2024-09-03 00:51:06 +05:30
parent 46340d7146
commit 13b28b5db9
9 changed files with 10 additions and 9 deletions
@@ -19,8 +19,9 @@ import { computed } from 'vue';
*/
export const usePortal = () => {
const { accountId } = useAccount();
const portalSlug = computed(() => useRoute().params.portalSlug);
const locale = computed(() => useRoute().params.locale);
const route = useRoute();
const portalSlug = computed(() => route.params.portalSlug);
const locale = computed(() => route.params.locale);
/**
* Generates the URL for an article.
@@ -1,6 +1,6 @@
<script>
import { dynamicTime } from 'shared/helpers/timeHelper';
import { usePortal } from '../composables/usePortal';
import { usePortal } from 'dashboard/composables/usePortal';
import { frontendURL } from 'dashboard/helper/URLHelper';
import Thumbnail from 'dashboard/components/widgets/Thumbnail.vue';
import { useAccount } from 'dashboard/composables/useAccount';
@@ -7,7 +7,7 @@ import SearchResults from './SearchResults.vue';
import ArticleView from './ArticleView.vue';
import ArticlesAPI from 'dashboard/api/helpCenter/articles';
import { buildPortalArticleURL } from 'dashboard/helper/portalHelper';
import { usePortal } from '../../composables/usePortal';
import { usePortal } from 'dashboard/composables/usePortal';
export default {
name: 'ArticleSearchPopover',
@@ -11,7 +11,7 @@ import AccountSelector from 'dashboard/components/layout/sidebarComponents/Accou
import NotificationPanel from 'dashboard/routes/dashboard/notifications/components/NotificationPanel.vue';
import { useUISettings } from 'dashboard/composables/useUISettings';
import { useAccount } from 'dashboard/composables/useAccount';
import { usePortal } from '../composables/usePortal';
import { usePortal } from 'dashboard/composables/usePortal';
import AddCategory from '../pages/categories/AddCategory.vue';
import { FEATURE_FLAGS } from 'dashboard/featureFlags';
const CommandBar = () =>
@@ -1,5 +1,5 @@
<script>
import { usePortal } from '../composables/usePortal';
import { usePortal } from 'dashboard/composables/usePortal';
export default {
props: {
locales: {
@@ -1,6 +1,6 @@
<script>
import Thumbnail from 'dashboard/components/widgets/Thumbnail.vue';
import { usePortal } from '../composables/usePortal';
import { usePortal } from 'dashboard/composables/usePortal';
export default {
components: {
@@ -5,7 +5,7 @@ import EditArticleHeader from '../../components/Header/EditArticleHeader.vue';
import ArticleEditor from '../../components/ArticleEditor.vue';
import ArticleSettings from './ArticleSettings.vue';
import Spinner from 'shared/components/Spinner.vue';
import { usePortal } from '../../composables/usePortal';
import { usePortal } from 'dashboard/composables/usePortal';
import wootConstants from 'dashboard/constants/globals';
import { buildPortalArticleURL } from 'dashboard/helper/portalHelper';
import { PORTALS_EVENTS } from '../../../../../helper/AnalyticsHelper/events';
@@ -3,7 +3,7 @@ import { mapGetters } from 'vuex';
import { useAlert } from 'dashboard/composables';
import EditArticleHeader from 'dashboard/routes/dashboard/helpcenter/components/Header/EditArticleHeader.vue';
import ArticleEditor from '../../components/ArticleEditor.vue';
import { usePortal } from '../../composables/usePortal';
import { usePortal } from 'dashboard/composables/usePortal';
import ArticleSettings from './ArticleSettings.vue';
import { PORTALS_EVENTS } from '../../../../../helper/AnalyticsHelper/events';
export default {