diff --git a/components/site-breadcrumb.tsx b/components/site-breadcrumb.tsx index b5b6fa04..e137c1d5 100644 --- a/components/site-breadcrumb.tsx +++ b/components/site-breadcrumb.tsx @@ -1,64 +1,111 @@ -'use client'; -import React from 'react' +"use client"; +import React from "react"; import { Link, usePathname, useRouter } from "@/components/navigation"; import { - Breadcrumb, - BreadcrumbEllipsis, - BreadcrumbItem, - BreadcrumbLink, - BreadcrumbList, - BreadcrumbPage, - BreadcrumbSeparator, -} from "@/components/ui/breadcrumb" -import { Icon } from "@/components/ui/icon" + Breadcrumb, + BreadcrumbItem, + BreadcrumbLink, + BreadcrumbList, + BreadcrumbSeparator, +} from "@/components/ui/breadcrumb"; +import { Icon } from "@/components/ui/icon"; import { ReactNode } from "react"; const SiteBreadcrumb = ({ children }: { children?: ReactNode }) => { - const location = usePathname(); - const locations = location.split('/').filter(path => path) + const router = useRouter(); + return ( +
+
+ + + + + + + + - return ( -
-
- - + + + + + +
- - - - - - - - - { - locations.map((link, index) => { - let href = `/${locations.slice(0, index + 1).join('/')}` - let itemLink = link - const isLast = index === locations.length - 1; - return ( - - - {isLast ? ( - itemLink?.replaceAll("-", " ") - ) : ( - {itemLink?.replaceAll("-", "")} - )} - - {locations.length !== index + 1 && } - - ) - }) - } - - -
-
{children}
-
- ); +
{children}
+
+ ); }; -export default SiteBreadcrumb; \ No newline at end of file +export default SiteBreadcrumb; + +// 'use client'; +// import React from 'react' +// import { Link, usePathname, useRouter } from "@/components/navigation"; +// import { +// Breadcrumb, +// BreadcrumbEllipsis, +// BreadcrumbItem, +// BreadcrumbLink, +// BreadcrumbList, +// BreadcrumbPage, +// BreadcrumbSeparator, +// } from "@/components/ui/breadcrumb" +// import { Icon } from "@/components/ui/icon" +// import { ReactNode } from "react"; + +// const SiteBreadcrumb = ({ children }: { children?: ReactNode }) => { +// const location = usePathname(); +// const locations = location.split('/').filter(path => path) + +// return ( +//
+//
+// +// + +// +// +// +// + +// +// + +// { +// locations.map((link, index) => { +// let href = `/${locations.slice(0, index + 1).join('/')}` +// let itemLink = link +// const isLast = index === locations.length - 1; +// return ( +// +// +// {isLast ? ( +// itemLink?.replaceAll("-", " ") +// ) : ( +// {itemLink?.replaceAll("-", "")} +// )} +// +// {locations.length !== index + 1 && } +// +// ) +// }) +// } +// +// +//
+//
{children}
+//
+// ); +// }; + +// export default SiteBreadcrumb; diff --git a/components/table/management-user/management-user-external-column-table.tsx b/components/table/management-user/management-user-external-column-table.tsx index 500a2862..646abedd 100644 --- a/components/table/management-user/management-user-external-column-table.tsx +++ b/components/table/management-user/management-user-external-column-table.tsx @@ -133,35 +133,35 @@ const columns: ColumnDef[] = [ - + {/* Aktivasi - - - - Detail - - - - - Edit - - - */} + - { - handleDelete(row.original.id); - }} + + Detail + + + + + Edit + + + { + handleDelete(row.original.id); + }} + > + Hapus - - + + ); diff --git a/components/table/management-user/management-user-internal-column-table.tsx b/components/table/management-user/management-user-internal-column-table.tsx index 6ba51011..32b0de3b 100644 --- a/components/table/management-user/management-user-internal-column-table.tsx +++ b/components/table/management-user/management-user-internal-column-table.tsx @@ -130,32 +130,32 @@ const columns: ColumnDef[] = [ - - - Detail - - - - - Edit - - - - { - handleDelete(row.original.id); - }} + + Detail + + + + + Edit + + + { + handleDelete(row.original.id); + }} + > + Hapus - - + + );