mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-13 07:46:06 +00:00
Get rid of obsolete /search/hashtag page
@Tirokk there is this neat URL module: https://nodejs.org/api/url.html It has convenience methods for adding query params. I'm just not quite sure about browser compatibility though.
This commit is contained in:
parent
20c118eab1
commit
ec19c732e5
@ -491,6 +491,8 @@ export default {
|
||||
// we have to replace our suggestion text with a mention
|
||||
// so it's important to pass also the position of your suggestion text
|
||||
selectItem(item) {
|
||||
const searchUrl = new URL('/')
|
||||
searchUrl.searchParams.set('hashtag', item.name)
|
||||
const typeAttrs = {
|
||||
mention: {
|
||||
// TODO: use router here
|
||||
@ -499,7 +501,7 @@ export default {
|
||||
},
|
||||
hashtag: {
|
||||
// TODO: Fill up with input hashtag in search field
|
||||
url: `/search/hashtag/${item.name}`,
|
||||
url: searchUrl.href,
|
||||
label: item.name,
|
||||
},
|
||||
}
|
||||
|
||||
@ -49,7 +49,7 @@
|
||||
export default {
|
||||
props: {
|
||||
user: { type: Object, required: true },
|
||||
hashtag: { type: Object, default: null },
|
||||
hashtag: { type: String, default: null },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
||||
@ -1,12 +0,0 @@
|
||||
<template>
|
||||
<div></div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
mounted() {
|
||||
const { id: hashtag } = this.$route.params
|
||||
this.$router.push({ path: '/', query: { hashtag } })
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Loading…
x
Reference in New Issue
Block a user