Add search results route

This commit is contained in:
2026-05-10 16:40:48 +02:00
parent 24926b7312
commit 8cdf16f144
2 changed files with 10 additions and 3 deletions
@@ -1,2 +1,6 @@
<script setup>
defineProps(['searchQuery'])
</script>
<template> <template>
</template> </template>
+6 -3
View File
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import { createRouter, createWebHistory } from 'vue-router' import { createRouter, createWebHistory } from 'vue-router';
import SearchView from '../views/SearchView.vue'; import SearchView from '../views/SearchView.vue';
import SearchResultsView from '@/features/search/views/SearchResultsView.vue'; import SearchResultsView from '@/features/search/views/SearchResultsView.vue';
@@ -28,9 +28,12 @@ const routes = [
{ {
path: '/search', path: '/search',
name: 'searchResults', name: 'searchResults',
component: SearchResultsView component: SearchResultsView,
props: route => ({
searchQuery: route.query.q
})
} }
] ];
const router = createRouter({ const router = createRouter({
history: createWebHistory(), history: createWebHistory(),