Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

add modified to useTeamMembers, fix website delete

Francis Cao87a18dc5708e
diff --git a/src/app/(main)/reports/ReportDeleteButton.tsx b/src/app/(main)/reports/ReportDeleteButton.tsx
index 99e39d71c..affd81fdf 100644
--- a/src/app/(main)/reports/ReportDeleteButton.tsx
+++ b/src/app/(main)/reports/ReportDeleteButton.tsx
@@ -49,6 +49,7 @@ export function ReportDeleteButton({
error={error}
onConfirm={handleConfirm.bind(null, close)}
onClose={close}
+ buttonLabel={formatMessage(labels.delete)}
/>
)}
</Modal>
diff --git a/src/app/(main)/settings/websites/[websiteId]/WebsiteDeleteForm.tsx b/src/app/(main)/settings/websites/[websiteId]/WebsiteDeleteForm.tsx
index 19755205b..077a8f4ae 100644
--- a/src/app/(main)/settings/websites/[websiteId]/WebsiteDeleteForm.tsx
+++ b/src/app/(main)/settings/websites/[websiteId]/WebsiteDeleteForm.tsx
@@ -15,7 +15,7 @@ export function WebsiteDeleteForm({
const { formatMessage, labels } = useMessages();
const { del, useMutation } = useApi();
const { mutate, isPending, error } = useMutation({
- mutationFn: (data: any) => del(`/websites/${websiteId}`, data),
+ mutationFn: () => del(`/websites/${websiteId}`),
});
const handleConfirm = async () => {
diff --git a/src/components/hooks/queries/useTeamMembers.ts b/src/components/hooks/queries/useTeamMembers.ts
index 064231d10..a6011cb8e 100644
--- a/src/components/hooks/queries/useTeamMembers.ts
+++ b/src/components/hooks/queries/useTeamMembers.ts
@@ -1,11 +1,13 @@
+import useModified from 'store/modified';
import useApi from './useApi';
import useFilterQuery from './useFilterQuery';
export function useTeamMembers(teamId: string) {
const { get } = useApi();
+ const modified = useModified((state: any) => state?.['team:users']);
return useFilterQuery({
- queryKey: ['teams:users', { teamId }],
+ queryKey: ['teams:users', { teamId, modified }],
queryFn: (params: any) => {
return get(`/teams/${teamId}/users`, params);
},