fix: Remove the usage of asyncComponent in emoji picker (#10232)

This PR has the following fixes

1. preview of article inside the iframe, earlier this didn't work because the iframe didn't get the URL correctly. We fix that by passing the URL is a query instead
2. Emoji picker caused a weird redirect, this was only happening when the chunk was loaded async, this PR changes it to use regular loading instead
This commit is contained in:
Shivam Mishra
2024-10-04 20:40:27 +05:30
committed by GitHub
parent e6e0f7de5a
commit 490fc4eaba
4 changed files with 3 additions and 13 deletions

View File

@@ -1,5 +1,4 @@
<script>
import { defineAsyncComponent } from 'vue';
import { mapGetters } from 'vuex';
import ChatAttachmentButton from 'widget/components/ChatAttachment.vue';
@@ -9,9 +8,7 @@ import FluentIcon from 'shared/components/FluentIcon/Index.vue';
import ResizableTextArea from 'shared/components/ResizableTextArea.vue';
import { useDarkMode } from 'widget/composables/useDarkMode';
const EmojiInput = defineAsyncComponent(
() => import('shared/components/emoji/EmojiInput.vue')
);
import EmojiInput from 'shared/components/emoji/EmojiInput.vue';
export default {
name: 'ChatInputWrap',

View File

@@ -36,7 +36,6 @@ export default createRouter({
{
path: '/article',
name: 'article-viewer',
props: true,
component: () => import('./views/ArticleViewer.vue'),
},
],

View File

@@ -6,17 +6,11 @@ export default {
components: {
IframeLoader,
},
props: {
link: {
type: String,
default: '',
},
},
};
</script>
<template>
<div class="bg-white h-full">
<IframeLoader :url="link" />
<IframeLoader :url="$route.query.link" />
</div>
</template>

View File

@@ -79,7 +79,7 @@ export default {
}
this.$router.push({
name: 'article-viewer',
params: { link: linkToOpen },
query: { link: linkToOpen },
});
},
viewAllArticles() {