diff --git a/src/Components/Map/Subcomponents/Controls/SearchControl.tsx b/src/Components/Map/Subcomponents/Controls/SearchControl.tsx index 89084a99..e0a27c7a 100644 --- a/src/Components/Map/Subcomponents/Controls/SearchControl.tsx +++ b/src/Components/Map/Subcomponents/Controls/SearchControl.tsx @@ -13,6 +13,7 @@ import { getValue } from '../../../../Utils/GetValue'; import { LocateControl } from './LocateControl'; import * as L from 'leaflet'; import MarkerIconFactory from '../../../../Utils/MarkerIconFactory'; +import { decodeTag } from '../../../../Utils/FormatTags'; @@ -100,7 +101,7 @@ export const SearchControl = ({ clusterRef }) => { let params = new URLSearchParams(window.location.search); window.history.pushState({}, "", "/" + `${params? `?${params}` : ""}`); }}> - #{capitalizeFirstLetter(tag.name)} + #{decodeTag(tag.name)} ))} diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx index 2f1d1da1..c834d1d8 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/StartEndView.tsx @@ -3,7 +3,7 @@ import { Item } from '../../../../types' export const StartEndView = ({item} : {item?:Item}) => { return ( -
+
diff --git a/src/Components/Profile/OverlayProfile.tsx b/src/Components/Profile/OverlayProfile.tsx index 7ad21aad..61900162 100644 --- a/src/Components/Profile/OverlayProfile.tsx +++ b/src/Components/Profile/OverlayProfile.tsx @@ -82,7 +82,7 @@ export function OverlayProfile() {
-
+
{ offers.length > 0 ?
diff --git a/src/Components/Profile/OverlayProfileSettings.tsx b/src/Components/Profile/OverlayProfileSettings.tsx index 22329264..7f5d81e9 100644 --- a/src/Components/Profile/OverlayProfileSettings.tsx +++ b/src/Components/Profile/OverlayProfileSettings.tsx @@ -187,11 +187,11 @@ export function OverlayProfileSettings() { let offer_state : Array = []; let needs_state : Array = []; - offers.map(o => { + await offers.map(o => { offer_state.push({directus_user_id: user?.id, tags_id: o.id}) }); - needs.map(n => { + await needs.map(n => { needs_state.push({directus_user_id: user?.id, tags_id: n.id}) }); diff --git a/src/Utils/FormatTags.ts b/src/Utils/FormatTags.ts index 85e85324..41a22556 100644 --- a/src/Utils/FormatTags.ts +++ b/src/Utils/FormatTags.ts @@ -4,5 +4,5 @@ export function decodeTag(string : string) { } export function encodeTag(string : string) { - return string.replace(/\s+/, "_"); + return string.replace(/\s+/g, "_"); } \ No newline at end of file