Advertisement
TIMAS_Bro

src/app/packages/columns.tsx

Mar 12th, 2024
569
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. "use client"
  2.  
  3. import { ColumnDef } from "@tanstack/react-table"
  4. import { MoreHorizontal } from "lucide-react"
  5. import axios from "axios";
  6. import { AxiosError } from 'axios'; // Import AxiosError type
  7. import { Button } from "@/components/ui/button"
  8. import SnackbarContent from '@mui/material/SnackbarContent';
  9. import React, { useState } from 'react';
  10. import { useRouter } from "next/navigation";
  11. import toast, { Toaster } from 'react-hot-toast';
  12. import Action from "../../hooks/ActionAllPackages";
  13. import {
  14.   DropdownMenu,
  15.   DropdownMenuContent,
  16.   DropdownMenuItem,
  17.   DropdownMenuLabel,
  18.   DropdownMenuSeparator,
  19.   DropdownMenuTrigger,
  20. } from "@/components/ui/dropdown-menu"
  21.  
  22. // This type is used to define the shape of our data.
  23. // You can use a Zod schema here if you want.
  24. export type Payment = {
  25.   id: string
  26.   name: string
  27. }
  28.  
  29.  
  30. export const columns: ColumnDef<Payment>[] = [
  31.   {
  32.     accessorKey: "id",
  33.     header: "Package ID",
  34.   },
  35.   {
  36.     accessorKey: "name",
  37.     header: "Package name",
  38.   },
  39.   {
  40.     id: "actions",
  41.     header: "Actions",
  42.     cell: ({ row }) => {
  43.       const paket = row.original
  44.       return (
  45.         <Action paket={paket} />
  46.       )
  47.     },
  48.   },
  49. ]
  50.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement