Skip to content

Commit

Permalink
Delete customer
Browse files Browse the repository at this point in the history
  • Loading branch information
pontusab committed Dec 5, 2024
1 parent 5141ec4 commit 857c3c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
2 changes: 1 addition & 1 deletion apps/dashboard/src/components/tables/customers/columns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const columns: ColumnDef<Customer>[] = [
{
id: "actions",
header: "Actions",
cell: ({ row }) => {
cell: ({ row, table }) => {
const { setParams } = useCustomerParams();

return (
Expand Down
10 changes: 1 addition & 9 deletions apps/dashboard/src/components/tables/customers/table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,10 @@ export function DataTable({
const [from, setFrom] = useState(pageSize);
const { ref, inView } = useInView();
const [hasNextPage, setHasNextPage] = useState(initialHasNextPage);
const { setParams, customerId } = useCustomerParams();
const { setParams } = useCustomerParams();

const deleteCustomer = useAction(deleteCustomerAction);

const selectedCustomer = data.find((customer) => customer?.id === customerId);

const setOpen = (id?: string) => {
if (id) {
setParams({ customerId: id });
Expand Down Expand Up @@ -120,12 +118,6 @@ export function DataTable({
</div>
</div>
)}
{/*
<InvoiceDetailsSheet
data={selectedInvoice}
isOpen={type === "details" && !!invoiceId}
setOpen={setOpen}
/> */}
</div>
);
}

0 comments on commit 857c3c9

Please sign in to comment.