mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
refactor: Prefer router.push over router.replace
push maintains the history
This commit is contained in:
parent
7a818a04a7
commit
56f37702b1
@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="search-results">
|
||||
<!-- <filter-menu :hashtag="value" @clearSearch="closeSearch" /> -->
|
||||
<filter-menu :hashtag="value" @clearSearch="closeSearch" />
|
||||
<tab-navigation
|
||||
:tabs="tabOptions"
|
||||
@openTab="value => showActive = value"
|
||||
@ -51,8 +51,6 @@ export default {
|
||||
computed: {
|
||||
...mapGetters({
|
||||
searchValue: 'search/searchValue',
|
||||
orderOptions: 'posts/orderOptions',
|
||||
sortingIcon: 'posts/orderIcon',
|
||||
}),
|
||||
posts() {
|
||||
return this.searchResults.filter(result => result.__typename === 'Post')
|
||||
@ -76,7 +74,7 @@ export default {
|
||||
this.value = this.$route.query.item
|
||||
this.query(this.value)
|
||||
} else {
|
||||
this.$router.replace('/')
|
||||
this.$router.push('/')
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -108,7 +106,7 @@ export default {
|
||||
}
|
||||
},
|
||||
closeSearch() {
|
||||
this.$router.replace('/')
|
||||
this.$router.push('/')
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user