From a8d6e41b597fafa59b279776dc5cab76b9faf19c Mon Sep 17 00:00:00 2001 From: Nudesuppe42 Date: Tue, 23 Apr 2024 18:36:17 +0200 Subject: [PATCH] fix(claims): :ambulance: Edit claim images only when owner or admin --- src/components/map/ClaimDrawer.tsx | 5 ++++- src/hooks/useUser.ts | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/map/ClaimDrawer.tsx b/src/components/map/ClaimDrawer.tsx index 0baefec0..0b7263b3 100644 --- a/src/components/map/ClaimDrawer.tsx +++ b/src/components/map/ClaimDrawer.tsx @@ -76,7 +76,10 @@ export function ClaimDrawer(props: ClaimDrawerProps) { )} diff --git a/src/hooks/useUser.ts b/src/hooks/useUser.ts index 08f08fc5..34f95d10 100644 --- a/src/hooks/useUser.ts +++ b/src/hooks/useUser.ts @@ -9,6 +9,7 @@ export const useUser = () => { const user = { user: data, token: session.data?.accessToken, + isLoggedIn: session.status === 'authenticated', isLoading: session.status === 'loading' && isLoading, refresh: () => mutate('/account'), hasPermission: (p: string, buildteam?: string) => {