Skip to content

Commit

Permalink
created useConversation composable
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigran-Harutyunyan committed Feb 13, 2024
1 parent ba1a166 commit e26d04b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions composables/useConversation.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export const useConversation = () => {
const params = useRoute().query;

const conversationId = computed(() => {
if (params?.conversationId) {

if (!useRoute().params?.conversationId) {
return '';
}

return params?.conversationId as string;
return useRoute().params?.conversationId as string;
});

const isOpen = computed(() => !!conversationId.value);
Expand Down

0 comments on commit e26d04b

Please sign in to comment.