oh lord. prettier eslint and all that

This commit is contained in:
Carl-Gerhard Lindesvärd
2023-11-02 20:24:41 +01:00
parent e1f37b439e
commit 107feda4ad
121 changed files with 1856 additions and 1684 deletions

View File

@@ -1,3 +1,11 @@
import { useRefetchActive } from '@/hooks/useRefetchActive';
import { pushModal, showConfirm } from '@/modals';
import type { IClientWithProject } from '@/types';
import { api } from '@/utils/api';
import { clipboard } from '@/utils/clipboard';
import { MoreHorizontal } from 'lucide-react';
import { Button } from '../ui/button';
import {
DropdownMenu,
DropdownMenuContent,
@@ -5,27 +13,20 @@ import {
DropdownMenuLabel,
DropdownMenuSeparator,
DropdownMenuTrigger,
} from "../ui/dropdown-menu";
import { Button } from "../ui/button";
import { MoreHorizontal } from "lucide-react";
import { pushModal, showConfirm } from "@/modals";
import { type IClientWithProject } from "@/types";
import { clipboard } from "@/utils/clipboard";
import { api } from "@/utils/api";
import { useRefetchActive } from "@/hooks/useRefetchActive";
import { toast } from "../ui/use-toast";
} from '../ui/dropdown-menu';
import { toast } from '../ui/use-toast';
export function ClientActions({ id }: IClientWithProject) {
const refetch = useRefetchActive()
const refetch = useRefetchActive();
const deletion = api.client.remove.useMutation({
onSuccess() {
toast({
title: 'Success',
description: 'Client revoked, incoming requests will be rejected.',
})
refetch()
}
})
});
refetch();
},
});
return (
<DropdownMenu>
<DropdownMenuTrigger asChild>
@@ -41,7 +42,7 @@ export function ClientActions({ id }: IClientWithProject) {
</DropdownMenuItem>
<DropdownMenuItem
onClick={() => {
pushModal("EditClient", { id });
pushModal('EditClient', { id });
}}
>
Edit
@@ -56,9 +57,9 @@ export function ClientActions({ id }: IClientWithProject) {
onConfirm() {
deletion.mutate({
id,
})
}
})
});
},
});
}}
>
Revoke