Load the ContentComponent non-lazily to improve performance

This commit is contained in:
Ramon Wenger 2024-05-22 10:27:44 +02:00
parent e66c79f5fa
commit 3533f776bd
1 changed files with 2 additions and 3 deletions

View File

@ -100,7 +100,7 @@
</template>
<script setup lang="ts">
import { defineAsyncComponent, inject, onMounted, ref, computed, onUnmounted } from 'vue';
import { inject, onMounted, ref, computed, onUnmounted } from 'vue';
import { useMutation } from '@vue/apollo-composable';
import AddContentButton from '@/components/AddContentButton.vue';
@ -109,6 +109,7 @@ import UserWidget from '@/components/UserWidget.vue';
import VisibilityAction from '@/components/visibility/VisibilityAction.vue';
import PopoverLink from '@/components/ui/PopoverLink.vue';
import CopyLink from '@/components/CopyLink.vue';
import ContentComponent from '@/components/content-blocks/ContentComponent.vue';
import { useRoute, useRouter } from 'vue-router';
import { hidden } from '@/helpers/visibility';
import { insertAtIndex, removeAtIndex } from '@/graphql/immutable-operations';
@ -144,8 +145,6 @@ export interface Props {
editMode?: boolean;
}
const ContentComponent = defineAsyncComponent(() => import('@/components/content-blocks/ContentComponent.vue'));
const { me, schoolClass } = getMe();
const contentBlockDiv = ref<HTMLElement | null>(null);