diff --git a/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx b/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx index 835da429..69f7569e 100644 --- a/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx +++ b/src/Components/Map/Subcomponents/ItemPopupComponents/HeaderView.tsx @@ -12,7 +12,7 @@ import EllipsisVerticalIcon from '@heroicons/react/16/solid/EllipsisVerticalIcon' import PencilIcon from '@heroicons/react/24/solid/PencilIcon' import TrashIcon from '@heroicons/react/24/solid/TrashIcon' -import { useState, useEffect } from 'react' +import { useState } from 'react' import { useNavigate } from 'react-router-dom' import TargetDotSVG from '#assets/targetDot.svg' @@ -56,10 +56,6 @@ export function HeaderView({ const [imageLoaded, setImageLoaded] = useState(false) - useEffect(() => { - setImageLoaded(false) - }, [item]) - const avatar = item.image && appState.assetsApi.url + item.image + `${big ? '?width=160&heigth=160' : '?width=80&heigth=80'}` diff --git a/src/Components/Map/setItemLocation.tsx b/src/Components/Map/setItemLocation.tsx deleted file mode 100644 index ae776994..00000000 --- a/src/Components/Map/setItemLocation.tsx +++ /dev/null @@ -1,10 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ - -import { useMap } from 'react-leaflet' - -export const setItemLocation = () => { - // eslint-disable-next-line react-hooks/rules-of-hooks - const map = useMap() - - return
-} diff --git a/src/Components/Profile/Templates/TabsView.tsx b/src/Components/Profile/Templates/TabsView.tsx index fa045374..bec02e24 100644 --- a/src/Components/Profile/Templates/TabsView.tsx +++ b/src/Components/Profile/Templates/TabsView.tsx @@ -150,29 +150,41 @@ export const TabsView = ({ - -
-
-
- Avatar + {getUserProfile(a.user_created.id) ? ( + +
+
+
+ {getUserProfile(a.user_created.id)?.image && ( + Avatar + )} +
+
+
+
+ {getUserProfile(a.user_created.id)?.name ?? + a.user_created.first_name}{' '} +
+
+ {timeAgo(a.date_created)} +
-
-
- {getUserProfile(a.user_created.id)?.name} -
-
- {timeAgo(a.date_created)} -
+ + ) : ( +
+
{a.user_created.first_name}
+
+ {timeAgo(a.date_created)}
- + )} ))}