From 5ffec65c2737b4c3a43ac6a296cb792eb5698c09 Mon Sep 17 00:00:00 2001 From: Anton Date: Sat, 22 Jul 2023 12:23:22 +0200 Subject: [PATCH] removed logging --- src/Components/Map/Layer.tsx | 7 ------- src/Utils/HeighlightTags.ts | 2 -- 2 files changed, 9 deletions(-) diff --git a/src/Components/Map/Layer.tsx b/src/Components/Map/Layer.tsx index a77828a5..08eea658 100644 --- a/src/Components/Map/Layer.tsx +++ b/src/Components/Map/Layer.tsx @@ -15,7 +15,6 @@ export const Layer = (props: LayerProps) => { const tags = useTags(); - console.log(tags); @@ -23,23 +22,17 @@ export const Layer = (props: LayerProps) => { // create a JS-Map with all Tags const tagMap = new Map(tags?.map(key => [key.id, key])); - console.log(tagMap); // returns all tags for passed item const getTags = (item: Item) => { - console.log(item.text); const regex = /(^|\B)#(?![0-9_]+\b)([a-zA-Z0-9_]{1,30})(\b|\r)/g; const strings = item.text.toLocaleLowerCase().match(regex); - console.log(strings); const tags: Tag[] = []; strings?.map(tag => { - console.log(tag.slice(1)); - if (tagMap.has(tag.slice(1))) { tags.push(tagMap.get(tag.slice(1))!) } }) - console.log(tags); return tags; }; diff --git a/src/Utils/HeighlightTags.ts b/src/Utils/HeighlightTags.ts index 36a6b210..7770d052 100644 --- a/src/Utils/HeighlightTags.ts +++ b/src/Utils/HeighlightTags.ts @@ -8,8 +8,6 @@ export function heighlightTags(message: string, tags: Tag[]): string { const hashTagRegex = /(^|\B)#(?![0-9_]+\b)([a-zA-Z0-9_]{1,30})(\b|\r)/g; message = message.replace(hashTagRegex, function (string) { - console.log(string); - const tag = tags.find(t => t.id.toLowerCase() == string.slice(1).toLowerCase()) return `` + string + '' });