430 lines
21 KiB
TypeScript
430 lines
21 KiB
TypeScript
"use client";
|
||
import React from "react";
|
||
import { set, z } from "zod";
|
||
import { useForm } from "react-hook-form";
|
||
import { zodResolver } from "@hookform/resolvers/zod";
|
||
import {
|
||
Form,
|
||
FormControl,
|
||
FormDescription,
|
||
FormField,
|
||
FormItem,
|
||
FormLabel,
|
||
FormMessage,
|
||
} from "@/components/ui/form";
|
||
import {
|
||
LucideRemoveFormatting,
|
||
RemoveFormattingIcon,
|
||
SidebarClose,
|
||
} from "lucide-react";
|
||
import Landing from "../ContextComponents/Commons/Landing";
|
||
|
||
const formSchema = z.object({
|
||
searchText: z.string().default(""),
|
||
});
|
||
|
||
const packageData = [
|
||
{
|
||
name: "Free package",
|
||
price: 0.0,
|
||
invoiceDate: `Jan 13,2023`,
|
||
status: true,
|
||
selected: false,
|
||
},
|
||
{
|
||
name: "Standard Package",
|
||
price: 59.0,
|
||
invoiceDate: `Jan 13,2023`,
|
||
status: true,
|
||
selected: false,
|
||
},
|
||
{
|
||
name: "Business Package",
|
||
price: 99.0,
|
||
invoiceDate: `Jan 13,2023`,
|
||
status: false,
|
||
selected: false,
|
||
},
|
||
{
|
||
name: "Standard Package",
|
||
price: 59.0,
|
||
invoiceDate: `Jan 13,2023`,
|
||
status: false,
|
||
selected: false,
|
||
},
|
||
];
|
||
const headers = [
|
||
"Package",
|
||
"Package1",
|
||
"Package2",
|
||
"Package3",
|
||
"Invoice date",
|
||
"Onaylandı",
|
||
];
|
||
|
||
const TableThree = () => {
|
||
const [packageList, setPackageList] = React.useState(Array.from(packageData));
|
||
const [tableShow, settableShow] = React.useState(true);
|
||
|
||
const form = useForm<z.infer<typeof formSchema>>({
|
||
resolver: zodResolver(formSchema),
|
||
});
|
||
|
||
function selectItem({ key }: { key: number }) {
|
||
packageList.map((item, index) => {
|
||
if (index === key) {
|
||
item.selected = !item.selected;
|
||
}
|
||
});
|
||
setPackageList([...packageList] as any);
|
||
}
|
||
|
||
function cleanSelection() {
|
||
packageList.map((item) => {
|
||
item.selected = false;
|
||
});
|
||
setPackageList([...packageList] as any);
|
||
}
|
||
|
||
function cleanSearch() {
|
||
form.setValue("searchText", "");
|
||
setPackageList(Array.from(packageData));
|
||
}
|
||
|
||
function search(values: z.infer<typeof formSchema>) {
|
||
const searchText = values.searchText;
|
||
if (searchText === "") {
|
||
setPackageList(Array.from(packageData));
|
||
} else {
|
||
const filteredList = Array.from(packageData).filter((item) => {
|
||
return item.name.toLowerCase().includes(searchText.toLowerCase());
|
||
});
|
||
setPackageList(filteredList);
|
||
}
|
||
}
|
||
|
||
React.useEffect(() => {}, [packageList]);
|
||
|
||
if (tableShow) {
|
||
return (
|
||
<>
|
||
<div className="md:flex items-center py-5 my-5 rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark">
|
||
<div className="my-5 md:flex md:w-1/4 md:my-auto justify-center text-lg align-middle">
|
||
<div
|
||
className="w-full md:w-[300px] rounded-full inline-flex items-center justify-center gap-2.5 bg-red-700 px-10 py-4 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10"
|
||
onClick={() => cleanSelection()}
|
||
>
|
||
<span>
|
||
<svg
|
||
className="fill-current"
|
||
width="20"
|
||
height="20"
|
||
viewBox="0 0 18 18"
|
||
fill="none"
|
||
xmlns="http://www.w3.org/2000/svg"
|
||
>
|
||
<path
|
||
d="M13.7535 2.47502H11.5879V1.9969C11.5879 1.15315 10.9129 0.478149 10.0691 0.478149H7.90352C7.05977 0.478149 6.38477 1.15315 6.38477 1.9969V2.47502H4.21914C3.40352 2.47502 2.72852 3.15002 2.72852 3.96565V4.8094C2.72852 5.42815 3.09414 5.9344 3.62852 6.1594L4.07852 15.4688C4.13477 16.6219 5.09102 17.5219 6.24414 17.5219H11.7004C12.8535 17.5219 13.8098 16.6219 13.866 15.4688L14.3441 6.13127C14.8785 5.90627 15.2441 5.3719 15.2441 4.78127V3.93752C15.2441 3.15002 14.5691 2.47502 13.7535 2.47502ZM7.67852 1.9969C7.67852 1.85627 7.79102 1.74377 7.93164 1.74377H10.0973C10.2379 1.74377 10.3504 1.85627 10.3504 1.9969V2.47502H7.70664V1.9969H7.67852ZM4.02227 3.96565C4.02227 3.85315 4.10664 3.74065 4.24727 3.74065H13.7535C13.866 3.74065 13.9785 3.82502 13.9785 3.96565V4.8094C13.9785 4.9219 13.8941 5.0344 13.7535 5.0344H4.24727C4.13477 5.0344 4.02227 4.95002 4.02227 4.8094V3.96565ZM11.7285 16.2563H6.27227C5.79414 16.2563 5.40039 15.8906 5.37227 15.3844L4.95039 6.2719H13.0785L12.6566 15.3844C12.6004 15.8625 12.2066 16.2563 11.7285 16.2563Z"
|
||
fill=""
|
||
/>
|
||
<path
|
||
d="M9.00039 9.11255C8.66289 9.11255 8.35352 9.3938 8.35352 9.75942V13.3313C8.35352 13.6688 8.63477 13.9782 9.00039 13.9782C9.33789 13.9782 9.64727 13.6969 9.64727 13.3313V9.75942C9.64727 9.3938 9.33789 9.11255 9.00039 9.11255Z"
|
||
fill=""
|
||
/>
|
||
<path
|
||
d="M11.2502 9.67504C10.8846 9.64692 10.6033 9.90004 10.5752 10.2657L10.4064 12.7407C10.3783 13.0782 10.6314 13.3875 10.9971 13.4157C11.0252 13.4157 11.0252 13.4157 11.0533 13.4157C11.3908 13.4157 11.6721 13.1625 11.6721 12.825L11.8408 10.35C11.8408 9.98442 11.5877 9.70317 11.2502 9.67504Z"
|
||
fill=""
|
||
/>
|
||
<path
|
||
d="M6.72245 9.67504C6.38495 9.70317 6.1037 10.0125 6.13182 10.35L6.3287 12.825C6.35683 13.1625 6.63808 13.4157 6.94745 13.4157C6.97558 13.4157 6.97558 13.4157 7.0037 13.4157C7.3412 13.3875 7.62245 13.0782 7.59433 12.7407L7.39745 10.2657C7.39745 9.90004 7.08808 9.64692 6.72245 9.67504Z"
|
||
fill=""
|
||
/>
|
||
</svg>
|
||
</span>
|
||
Seçimleri Temizle
|
||
</div>
|
||
</div>
|
||
<div className="my-5 md:flex md:w-1/4 md:my-auto justify-center text-lg align-middle">
|
||
<div className="w-full md:w-[300px] rounded-full inline-flex items-center justify-center gap-2.5 bg-emerald-800 px-10 py-4 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10">
|
||
<span>
|
||
<svg
|
||
className="fill-current"
|
||
width="20"
|
||
height="20"
|
||
viewBox="0 0 18 18"
|
||
fill="none"
|
||
xmlns="http://www.w3.org/2000/svg"
|
||
>
|
||
<path
|
||
d="M13.7535 2.47502H11.5879V1.9969C11.5879 1.15315 10.9129 0.478149 10.0691 0.478149H7.90352C7.05977 0.478149 6.38477 1.15315 6.38477 1.9969V2.47502H4.21914C3.40352 2.47502 2.72852 3.15002 2.72852 3.96565V4.8094C2.72852 5.42815 3.09414 5.9344 3.62852 6.1594L4.07852 15.4688C4.13477 16.6219 5.09102 17.5219 6.24414 17.5219H11.7004C12.8535 17.5219 13.8098 16.6219 13.866 15.4688L14.3441 6.13127C14.8785 5.90627 15.2441 5.3719 15.2441 4.78127V3.93752C15.2441 3.15002 14.5691 2.47502 13.7535 2.47502ZM7.67852 1.9969C7.67852 1.85627 7.79102 1.74377 7.93164 1.74377H10.0973C10.2379 1.74377 10.3504 1.85627 10.3504 1.9969V2.47502H7.70664V1.9969H7.67852ZM4.02227 3.96565C4.02227 3.85315 4.10664 3.74065 4.24727 3.74065H13.7535C13.866 3.74065 13.9785 3.82502 13.9785 3.96565V4.8094C13.9785 4.9219 13.8941 5.0344 13.7535 5.0344H4.24727C4.13477 5.0344 4.02227 4.95002 4.02227 4.8094V3.96565ZM11.7285 16.2563H6.27227C5.79414 16.2563 5.40039 15.8906 5.37227 15.3844L4.95039 6.2719H13.0785L12.6566 15.3844C12.6004 15.8625 12.2066 16.2563 11.7285 16.2563Z"
|
||
fill=""
|
||
/>
|
||
<path
|
||
d="M9.00039 9.11255C8.66289 9.11255 8.35352 9.3938 8.35352 9.75942V13.3313C8.35352 13.6688 8.63477 13.9782 9.00039 13.9782C9.33789 13.9782 9.64727 13.6969 9.64727 13.3313V9.75942C9.64727 9.3938 9.33789 9.11255 9.00039 9.11255Z"
|
||
fill=""
|
||
/>
|
||
<path
|
||
d="M11.2502 9.67504C10.8846 9.64692 10.6033 9.90004 10.5752 10.2657L10.4064 12.7407C10.3783 13.0782 10.6314 13.3875 10.9971 13.4157C11.0252 13.4157 11.0252 13.4157 11.0533 13.4157C11.3908 13.4157 11.6721 13.1625 11.6721 12.825L11.8408 10.35C11.8408 9.98442 11.5877 9.70317 11.2502 9.67504Z"
|
||
fill=""
|
||
/>
|
||
<path
|
||
d="M6.72245 9.67504C6.38495 9.70317 6.1037 10.0125 6.13182 10.35L6.3287 12.825C6.35683 13.1625 6.63808 13.4157 6.94745 13.4157C6.97558 13.4157 6.97558 13.4157 7.0037 13.4157C7.3412 13.3875 7.62245 13.0782 7.59433 12.7407L7.39745 10.2657C7.39745 9.90004 7.08808 9.64692 6.72245 9.67504Z"
|
||
fill=""
|
||
/>
|
||
</svg>
|
||
</span>
|
||
Seçili Olanları Sil
|
||
</div>
|
||
</div>
|
||
<div className="my-5 md:flex md:w-1/4 md:my-auto justify-center text-lg align-middle">
|
||
<div className="w-full md:w-[300px] rounded-full inline-flex items-center justify-center gap-2.5 bg-blue-600 px-10 py-4 text-center font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10">
|
||
<span>
|
||
<svg
|
||
className="fill-current"
|
||
width="20"
|
||
height="20"
|
||
viewBox="0 0 18 18"
|
||
fill="none"
|
||
xmlns="http://www.w3.org/2000/svg"
|
||
>
|
||
<path
|
||
d="M13.7535 2.47502H11.5879V1.9969C11.5879 1.15315 10.9129 0.478149 10.0691 0.478149H7.90352C7.05977 0.478149 6.38477 1.15315 6.38477 1.9969V2.47502H4.21914C3.40352 2.47502 2.72852 3.15002 2.72852 3.96565V4.8094C2.72852 5.42815 3.09414 5.9344 3.62852 6.1594L4.07852 15.4688C4.13477 16.6219 5.09102 17.5219 6.24414 17.5219H11.7004C12.8535 17.5219 13.8098 16.6219 13.866 15.4688L14.3441 6.13127C14.8785 5.90627 15.2441 5.3719 15.2441 4.78127V3.93752C15.2441 3.15002 14.5691 2.47502 13.7535 2.47502ZM7.67852 1.9969C7.67852 1.85627 7.79102 1.74377 7.93164 1.74377H10.0973C10.2379 1.74377 10.3504 1.85627 10.3504 1.9969V2.47502H7.70664V1.9969H7.67852ZM4.02227 3.96565C4.02227 3.85315 4.10664 3.74065 4.24727 3.74065H13.7535C13.866 3.74065 13.9785 3.82502 13.9785 3.96565V4.8094C13.9785 4.9219 13.8941 5.0344 13.7535 5.0344H4.24727C4.13477 5.0344 4.02227 4.95002 4.02227 4.8094V3.96565ZM11.7285 16.2563H6.27227C5.79414 16.2563 5.40039 15.8906 5.37227 15.3844L4.95039 6.2719H13.0785L12.6566 15.3844C12.6004 15.8625 12.2066 16.2563 11.7285 16.2563Z"
|
||
fill=""
|
||
/>
|
||
<path
|
||
d="M9.00039 9.11255C8.66289 9.11255 8.35352 9.3938 8.35352 9.75942V13.3313C8.35352 13.6688 8.63477 13.9782 9.00039 13.9782C9.33789 13.9782 9.64727 13.6969 9.64727 13.3313V9.75942C9.64727 9.3938 9.33789 9.11255 9.00039 9.11255Z"
|
||
fill=""
|
||
/>
|
||
<path
|
||
d="M11.2502 9.67504C10.8846 9.64692 10.6033 9.90004 10.5752 10.2657L10.4064 12.7407C10.3783 13.0782 10.6314 13.3875 10.9971 13.4157C11.0252 13.4157 11.0252 13.4157 11.0533 13.4157C11.3908 13.4157 11.6721 13.1625 11.6721 12.825L11.8408 10.35C11.8408 9.98442 11.5877 9.70317 11.2502 9.67504Z"
|
||
fill=""
|
||
/>
|
||
<path
|
||
d="M6.72245 9.67504C6.38495 9.70317 6.1037 10.0125 6.13182 10.35L6.3287 12.825C6.35683 13.1625 6.63808 13.4157 6.94745 13.4157C6.97558 13.4157 6.97558 13.4157 7.0037 13.4157C7.3412 13.3875 7.62245 13.0782 7.59433 12.7407L7.39745 10.2657C7.39745 9.90004 7.08808 9.64692 6.72245 9.67504Z"
|
||
fill=""
|
||
/>
|
||
</svg>
|
||
</span>
|
||
Kayıdı Güncelle
|
||
</div>
|
||
</div>
|
||
<div className="my-5 md:flex md:w-1/4 md:my-auto justify-center text-lg align-middle">
|
||
<div
|
||
className="w-full md:w-[300px] rounded-full inline-flex items-center justify-center gap-2.5 bg-indigo-600 px-10 py-4 text-center
|
||
font-medium text-white hover:bg-opacity-90 lg:px-8 xl:px-10"
|
||
>
|
||
<span>
|
||
<svg
|
||
className="fill-current"
|
||
width="20"
|
||
height="20"
|
||
viewBox="0 0 18 18"
|
||
fill="none"
|
||
xmlns="http://www.w3.org/2000/svg"
|
||
>
|
||
<path
|
||
d="M13.7535 2.47502H11.5879V1.9969C11.5879 1.15315 10.9129 0.478149 10.0691 0.478149H7.90352C7.05977 0.478149 6.38477 1.15315 6.38477 1.9969V2.47502H4.21914C3.40352 2.47502 2.72852 3.15002 2.72852 3.96565V4.8094C2.72852 5.42815 3.09414 5.9344 3.62852 6.1594L4.07852 15.4688C4.13477 16.6219 5.09102 17.5219 6.24414 17.5219H11.7004C12.8535 17.5219 13.8098 16.6219 13.866 15.4688L14.3441 6.13127C14.8785 5.90627 15.2441 5.3719 15.2441 4.78127V3.93752C15.2441 3.15002 14.5691 2.47502 13.7535 2.47502ZM7.67852 1.9969C7.67852 1.85627 7.79102 1.74377 7.93164 1.74377H10.0973C10.2379 1.74377 10.3504 1.85627 10.3504 1.9969V2.47502H7.70664V1.9969H7.67852ZM4.02227 3.96565C4.02227 3.85315 4.10664 3.74065 4.24727 3.74065H13.7535C13.866 3.74065 13.9785 3.82502 13.9785 3.96565V4.8094C13.9785 4.9219 13.8941 5.0344 13.7535 5.0344H4.24727C4.13477 5.0344 4.02227 4.95002 4.02227 4.8094V3.96565ZM11.7285 16.2563H6.27227C5.79414 16.2563 5.40039 15.8906 5.37227 15.3844L4.95039 6.2719H13.0785L12.6566 15.3844C12.6004 15.8625 12.2066 16.2563 11.7285 16.2563Z"
|
||
fill=""
|
||
/>
|
||
<path
|
||
d="M9.00039 9.11255C8.66289 9.11255 8.35352 9.3938 8.35352 9.75942V13.3313C8.35352 13.6688 8.63477 13.9782 9.00039 13.9782C9.33789 13.9782 9.64727 13.6969 9.64727 13.3313V9.75942C9.64727 9.3938 9.33789 9.11255 9.00039 9.11255Z"
|
||
fill=""
|
||
/>
|
||
<path
|
||
d="M11.2502 9.67504C10.8846 9.64692 10.6033 9.90004 10.5752 10.2657L10.4064 12.7407C10.3783 13.0782 10.6314 13.3875 10.9971 13.4157C11.0252 13.4157 11.0252 13.4157 11.0533 13.4157C11.3908 13.4157 11.6721 13.1625 11.6721 12.825L11.8408 10.35C11.8408 9.98442 11.5877 9.70317 11.2502 9.67504Z"
|
||
fill=""
|
||
/>
|
||
<path
|
||
d="M6.72245 9.67504C6.38495 9.70317 6.1037 10.0125 6.13182 10.35L6.3287 12.825C6.35683 13.1625 6.63808 13.4157 6.94745 13.4157C6.97558 13.4157 6.97558 13.4157 7.0037 13.4157C7.3412 13.3875 7.62245 13.0782 7.59433 12.7407L7.39745 10.2657C7.39745 9.90004 7.08808 9.64692 6.72245 9.67504Z"
|
||
fill=""
|
||
/>
|
||
</svg>
|
||
</span>
|
||
Kayıt ekle
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<div className="w-full md:flex items-center py-5 my-5 rounded-sm border border-stroke bg-white shadow-default dark:border-strokedark dark:bg-boxdark">
|
||
<div className="md:w-full mx-5 md:flex md:my-auto justify-start text-lg align-middle">
|
||
<Form {...form}>
|
||
<form
|
||
className="min-w-max md:min-w-full"
|
||
onSubmit={form.handleSubmit(search)}
|
||
>
|
||
<div className="relative">
|
||
<FormField
|
||
control={form.control}
|
||
name="searchText"
|
||
render={({ field }) => (
|
||
<FormItem>
|
||
<FormControl>
|
||
<input
|
||
type="text"
|
||
placeholder="Aramak istediğiniz metini yazınız"
|
||
className="w-full rounded-lg border border-stroke bg-transparent py-4 pl-6 pr-10 text-black outline-none focus:border-primary focus-visible:shadow-none dark:border-form-strokedark dark:bg-form-input dark:text-white dark:focus:border-primary"
|
||
{...field}
|
||
value={field.value || ""}
|
||
/>
|
||
</FormControl>
|
||
<FormMessage />
|
||
</FormItem>
|
||
)}
|
||
/>
|
||
<button
|
||
type="submit"
|
||
className="absolute right-5 top-1/2 -translate-y-1/2"
|
||
>
|
||
<svg
|
||
xmlns="http://www.w3.org/2000/svg"
|
||
width="32"
|
||
height="32"
|
||
viewBox="0 0 24 24"
|
||
fill="none"
|
||
stroke="currentColor"
|
||
stroke-width="2"
|
||
stroke-linecap="round"
|
||
stroke-linejoin="round"
|
||
className="lucide lucide-search"
|
||
>
|
||
<circle cx="11" cy="11" r="8" />
|
||
<path d="m21 21-4.3-4.3" />
|
||
</svg>
|
||
</button>
|
||
<button
|
||
onClick={() => cleanSearch()}
|
||
className="absolute right-20 top-1/2 -translate-y-1/2"
|
||
>
|
||
<svg
|
||
xmlns="http://www.w3.org/2000/svg"
|
||
width="32"
|
||
height="32"
|
||
viewBox="0 0 24 24"
|
||
fill="none"
|
||
stroke="currentColor"
|
||
stroke-width="2"
|
||
stroke-linecap="round"
|
||
stroke-linejoin="round"
|
||
className="lucide lucide-x"
|
||
>
|
||
<path d="M18 6 6 18" />
|
||
<path d="m6 6 12 12" />
|
||
</svg>
|
||
</button>
|
||
</div>
|
||
</form>
|
||
</Form>
|
||
</div>
|
||
</div>
|
||
|
||
<div className="text-lg rounded-sm border border-stroke bg-white px-5 pb-2.5 pt-6 shadow-default dark:border-strokedark dark:bg-boxdark sm:px-7.5 xl:pb-1">
|
||
<div className="max-w-full mt-5 mb-10 overflow-x-auto">
|
||
<table className="w-full table-auto">
|
||
<thead>
|
||
<tr className="bg-gray-2 dark:bg-meta-4 border-b border-[#eee] py-5 dark:border-strokedark xl:pl-11">
|
||
{headers.map((header, key) => (
|
||
<th
|
||
key={key}
|
||
className="min-w-auto px-4 py-4 font-medium text-black dark:text-white"
|
||
>
|
||
{header}
|
||
</th>
|
||
))}
|
||
</tr>
|
||
</thead>
|
||
<tbody>
|
||
{packageList.map((packageItem, key) => (
|
||
<tr
|
||
className={`${
|
||
packageItem.selected === true ? "bg-blue-900" : ""
|
||
}`}
|
||
key={key}
|
||
onClick={() => selectItem({ key })}
|
||
>
|
||
<td className="border-b border-[#eee] py-5 pl-9 dark:border-strokedark xl:pl-11">
|
||
<h5
|
||
className={`font-medium ${
|
||
packageItem.selected === true
|
||
? "bg-blue-900 text-white"
|
||
: "text-black"
|
||
}`}
|
||
>
|
||
{packageItem.name}
|
||
</h5>
|
||
</td>
|
||
<td className="border-b border-[#eee] py-5 pl-9 dark:border-strokedark xl:pl-11">
|
||
<h5
|
||
className={`font-medium ${
|
||
packageItem.selected === true
|
||
? "bg-blue-900 text-white"
|
||
: "text-black"
|
||
}`}
|
||
>
|
||
{packageItem.name}
|
||
</h5>
|
||
</td>
|
||
<td className="border-b border-[#eee] py-5 pl-9 dark:border-strokedark xl:pl-11">
|
||
<h5
|
||
className={`font-medium ${
|
||
packageItem.selected === true
|
||
? "bg-blue-900 text-white"
|
||
: "text-black"
|
||
}`}
|
||
>
|
||
{packageItem.name}
|
||
</h5>
|
||
</td>
|
||
<td className="border-b border-[#eee] py-5 pl-9 dark:border-strokedark xl:pl-11">
|
||
<h5
|
||
className={`font-medium ${
|
||
packageItem.selected === true
|
||
? "bg-blue-900 text-white"
|
||
: "text-black"
|
||
}`}
|
||
>
|
||
{packageItem.name}
|
||
</h5>
|
||
</td>
|
||
<td className="border-b border-[#eee] py-5 dark:border-strokedark">
|
||
<p
|
||
className={`font-medium ${
|
||
packageItem.selected === true
|
||
? "bg-blue-900 text-white"
|
||
: "text-black"
|
||
}`}
|
||
>
|
||
{packageItem.invoiceDate}
|
||
</p>
|
||
</td>
|
||
<td
|
||
className={`border-b border-[#eee] py-5 text-center dark:border-strokedark" ${
|
||
packageItem.selected === true
|
||
? "bg-blue-100 text-white"
|
||
: "text-black"
|
||
}`}
|
||
>
|
||
<p
|
||
className={`inline-flex rounded-full bg-opacity-10 px-3 py-1 text-sm font-medium ${
|
||
packageItem.status
|
||
? "bg-success text-success"
|
||
: "bg-danger text-danger"
|
||
}`}
|
||
>
|
||
{packageItem.status ? "Evet" : "Hayır"}
|
||
</p>
|
||
</td>
|
||
</tr>
|
||
))}
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
</div>
|
||
</>
|
||
);
|
||
} else {
|
||
return <Landing />;
|
||
}
|
||
};
|
||
|
||
export default TableThree;
|