Skip to content

Commit

Permalink
not a good idea to call useActiveChannel in app for this case
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigran-Harutyunyan committed Feb 15, 2024
1 parent 7668ff7 commit e828a53
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
7 changes: 1 addition & 6 deletions app.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
<script setup lang="ts">
import { useActiveChannel } from "@/composables/useActiveChannel";
const { pusherClient } = useNuxtApp();
useActiveChannel(pusherClient);
</script>
<script setup lang="ts"></script>
<template>
<naive-config>
<n-notification-provider>
Expand Down
6 changes: 6 additions & 0 deletions pages/conversations/index.vue
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
<script setup lang="ts">
import EmptyState from "@/components/EmptyState.vue";
import { useActiveChannel } from "@/composables/useActiveChannel";
definePageMeta({ middleware: "auth", layout: "conversations" });
useHead({
title: "Conversations | Messenger",
});
const { pusherClient } = useNuxtApp();
useActiveChannel(pusherClient);
</script>

<template>
Expand Down
6 changes: 6 additions & 0 deletions pages/users/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
import EmptyState from "@/components/EmptyState.vue";
definePageMeta({ middleware: "auth", layout: "users" });
import { useActiveChannel } from "@/composables/useActiveChannel";
const { pusherClient } = useNuxtApp();
useActiveChannel(pusherClient);
useHead({
title: "Users | Messenger",
});
Expand Down

0 comments on commit e828a53

Please sign in to comment.