Skip to content

Commit

Permalink
refactor: replace compassDirection function with translation for stop…
Browse files Browse the repository at this point in the history
… direction in SearchPane
  • Loading branch information
Ahmedhossamdev committed Nov 25, 2024
1 parent 38eae49 commit 92765da
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/components/search/SearchPane.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import SearchField from '$components/search/SearchField.svelte';
import SearchResultItem from '$components/search/SearchResultItem.svelte';
import { createEventDispatcher, onMount } from 'svelte';
import { compassDirection } from '$lib/formatters';
import { prioritizedRouteTypeForDisplay } from '$config/routeConfig';
import { faMapPin, faSignsPost } from '@fortawesome/free-solid-svg-icons';
import { t } from 'svelte-i18n';
Expand Down Expand Up @@ -154,14 +153,13 @@
/>
{/each}
{/if}

{#if stops?.length > 0}
{#each stops as stop}
<SearchResultItem
on:click={() => handleStopClick(stop)}
icon={faSignsPost}
title={stop.name}
subtitle={`${compassDirection(stop.direction)}; Code: ${stop.code}`}
subtitle={`${stop.direction ? $t(`direction.${stop.direction}`) : ''}; Code: ${stop.code}`}
/>
{/each}
{/if}
Expand Down

0 comments on commit 92765da

Please sign in to comment.