Revert "Get rid of obsolete /search/hashtag page"

This reverts commit ec19c732e5678544d8dfd50c25f2c33e5aeb217e.

Ok, native module URL cannot parse relative URLs. It ensures that all parts
of the URL are present. So I'll revert this to get the ball rolling. We
can refactor out the obsolete page later on.

FYI @Tirokk
This commit is contained in:
Robert Schäfer 2019-07-09 14:39:28 +02:00
parent 8303febc80
commit 6f24f066d6
3 changed files with 14 additions and 4 deletions

View File

@ -491,8 +491,6 @@ 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
@ -501,7 +499,7 @@ export default {
},
hashtag: {
// TODO: Fill up with input hashtag in search field
url: searchUrl.href,
url: `/search/hashtag/${item.name}`,
label: item.name,
},
}

View File

@ -49,7 +49,7 @@
export default {
props: {
user: { type: Object, required: true },
hashtag: { type: String, default: null },
hashtag: { type: Object, default: null },
},
data() {
return {

View File

@ -0,0 +1,12 @@
<template>
<div></div>
</template>
<script>
export default {
mounted() {
const { id: hashtag } = this.$route.params
this.$router.push({ path: '/', query: { hashtag } })
},
}
</script>