Skip to content

Commit

Permalink
Merge pull request #2 from Eisvana/dev
Browse files Browse the repository at this point in the history
add url params
  • Loading branch information
Lenni009 authored Jul 22, 2024
2 parents 4559ffd + 026a656 commit 3688e0c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ import { ref, computed } from 'vue';
import systems from './assets/systems.json';
import ListItem from './components/ListItem.vue';
const searchTerm = ref('');
const url = window.location;
const params = new URLSearchParams(url.search);
const paramSearch = params.get('name');
const searchTerm = ref(paramSearch ?? '');
const filteredData = computed(() => systems.filter((item) => item.Discoverer.includes(searchTerm.value)));
</script>
Expand Down

0 comments on commit 3688e0c

Please sign in to comment.