Skip to content

Commit

Permalink
fix: hyphenate division in results title
Browse files Browse the repository at this point in the history
  • Loading branch information
themightychris committed Nov 11, 2024
1 parent c928b33 commit fd5af1b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/SearchResults.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup>
import { divisionWithHyphen } from './map/divisionUtils'
import { ref, computed, watch } from 'vue'
const props = defineProps({
Expand Down Expand Up @@ -26,12 +27,12 @@ const resultsTitle = computed(() => {
// If there's a search term, it's a text-based search
if (props.results.searchTerm) {
return `Search Results for "${props.results.searchTerm}" - ${props.results.matches.length} Results`
return `Search Results for "${props.results.searchTerm}": ${props.results.matches.length} Results`
}
// If there's exactly one division, it's from a map click
if (props.results.divisions.length === 1) {
return `Division ${props.results.divisions[0]} - ${props.results.matches.length} Results`
return `Division ${divisionWithHyphen(props.results.divisions[0])}: ${props.results.matches.length} Results`
}
// Default case
Expand Down

0 comments on commit fd5af1b

Please sign in to comment.