fix: router

This commit is contained in:
Jannat Patel
2024-03-19 12:51:11 +05:30
parent 86748b301d
commit f15862cef4
4 changed files with 21 additions and 6 deletions

View File

@@ -71,6 +71,7 @@ import { MessageSquareIcon } from 'lucide-vue-next'
const showTopics = ref(true)
const currentTopic = ref(null)
const socket = inject('$socket')
const user = inject('$user')
const showTopicModal = ref(false)
const props = defineProps({
@@ -101,6 +102,8 @@ const props = defineProps({
})
onMounted(() => {
if (user.data) topics.reload()
socket.on('new_discussion_topic', (data) => {
topics.refresh()
})
@@ -116,7 +119,6 @@ const topics = createResource({
single_thread: props.singleThread,
}
},
auto: true,
})
const showReplies = (topic) => {

View File

@@ -97,7 +97,7 @@ const routes = [
]
let router = createRouter({
history: createWebHistory('/'),
history: createWebHistory('/learning'),
routes,
})