diff --git a/src/Components/Map/hooks/usePermissions.tsx b/src/Components/Map/hooks/usePermissions.tsx index ec98cb3f..b9d02afc 100644 --- a/src/Components/Map/hooks/usePermissions.tsx +++ b/src/Components/Map/hooks/usePermissions.tsx @@ -121,7 +121,7 @@ function usePermissionsManager(initialPermissions: Permission[]): { ); } }, - [permissions, user] + [permissions, user, adminRole] ); diff --git a/src/Components/Profile/ProfileView.tsx b/src/Components/Profile/ProfileView.tsx index c1ac6efd..d7b7e4e7 100644 --- a/src/Components/Profile/ProfileView.tsx +++ b/src/Components/Profile/ProfileView.tsx @@ -140,8 +140,6 @@ export function ProfileView({ userType, attestationApi }: { userType: string , a setTemplate(item?.layer?.itemType.template || userType); }, [userType, item]) - const [ urlParams, setUrlParams] = useState(new URLSearchParams(location.search)); - return ( <> @@ -161,7 +159,7 @@ export function ProfileView({ userType, attestationApi }: { userType: string , a } {template == "tabs" && - linkItem(id, item, updateItem)} unlinkItem={(id) => unlinkItem(id, item, updateItem)}/> + linkItem(id, item, updateItem)} unlinkItem={(id) => unlinkItem(id, item, updateItem)}/> } diff --git a/src/Components/Profile/Templates/TabsView.tsx b/src/Components/Profile/Templates/TabsView.tsx index 00ef9532..d8deb7b0 100644 --- a/src/Components/Profile/Templates/TabsView.tsx +++ b/src/Components/Profile/Templates/TabsView.tsx @@ -11,7 +11,7 @@ import { useAssetApi } from '../../AppShell/hooks/useAssets' import { timeAgo } from '../../../Utils/TimeAgo' // eslint-disable-next-line no-unused-vars -export const TabsView = ({ attestations, userType, item, offers, needs, relations, updatePermission, loading, linkItem, unlinkItem, setUrlParams }: { attestations: Array, userType: string, item: Item, offers: Array, needs: Array, relations: Array, updatePermission: boolean, loading: boolean, linkItem: (id: string) => Promise, unlinkItem: (id: string) => Promise, setUrlParams: any }) => { +export const TabsView = ({ attestations, userType, item, offers, needs, relations, updatePermission, loading, linkItem, unlinkItem }: { attestations: Array, userType: string, item: Item, offers: Array, needs: Array, relations: Array, updatePermission: boolean, loading: boolean, linkItem: (id: string) => Promise, unlinkItem: (id: string) => Promise }) => { const addFilterTag = useAddFilterTag(); const [activeTab, setActiveTab] = useState(); @@ -42,7 +42,6 @@ export const TabsView = ({ attestations, userType, item, offers, needs, relation params.set("tab", `${id}`); const newUrl = location.pathname + "?" + params.toString(); window.history.pushState({}, '', newUrl); - setUrlParams(params); // eslint-disable-next-line react-hooks/exhaustive-deps }, [location.pathname]);