diff --git a/app/components/icons/cashier-machine.tsx b/app/components/icons/cashier-machine.tsx deleted file mode 100644 index 95d5819..0000000 --- a/app/components/icons/cashier-machine.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import type { JSX, SVGProps } from 'react' - -export const CashierMachineIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - ) -} diff --git a/app/components/icons/editor.tsx b/app/components/icons/editor.tsx deleted file mode 100644 index 70570b4..0000000 --- a/app/components/icons/editor.tsx +++ /dev/null @@ -1,239 +0,0 @@ -import type { JSX, SVGProps } from 'react' - -export const BoldIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - ) -} - -export const ItalicIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - ) -} -export const UnderlineIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - ) -} -export const UndoIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - ) -} -export const RedoIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - ) -} -export const ListIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - ) -} -export const ListOrderIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - ) -} -export const LinkIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - - ) -} -export const ImageIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - - ) -} -export const CodeIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - ) -} -export const QuoteIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - ) -} -export const StrikethroughIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - ) -} diff --git a/app/components/icons/notification.tsx b/app/components/icons/notification.tsx deleted file mode 100644 index 22ca578..0000000 --- a/app/components/icons/notification.tsx +++ /dev/null @@ -1,37 +0,0 @@ -import type { JSX, SVGProps } from 'react' - -type TNotificationIcon = { - showBadge?: boolean -} & JSX.IntrinsicAttributes & - SVGProps - -export const NotificationIcon = ({ - showBadge = false, - ...properties -}: TNotificationIcon) => { - return ( - - - {showBadge && ( - - )} - - ) -} diff --git a/app/components/icons/setting.tsx b/app/components/icons/setting.tsx deleted file mode 100644 index 8a818fd..0000000 --- a/app/components/icons/setting.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import type { JSX, SVGProps } from 'react' - -export const SettingIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - ) -} diff --git a/app/components/icons/user-doctor.tsx b/app/components/icons/user-doctor.tsx deleted file mode 100644 index f776ab6..0000000 --- a/app/components/icons/user-doctor.tsx +++ /dev/null @@ -1,21 +0,0 @@ -import type { JSX, SVGProps } from 'react' - -export const UserDoctorIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - ) -} diff --git a/app/components/icons/wallet.tsx b/app/components/icons/wallet.tsx deleted file mode 100644 index 262faf4..0000000 --- a/app/components/icons/wallet.tsx +++ /dev/null @@ -1,23 +0,0 @@ -import type { JSX, SVGProps } from 'react' - -export const WalletIcon = ( - properties: JSX.IntrinsicAttributes & SVGProps, -) => { - return ( - - - - ) -} diff --git a/app/components/ui/table.tsx b/app/components/ui/table.tsx index fcd38ec..ab29799 100644 --- a/app/components/ui/table.tsx +++ b/app/components/ui/table.tsx @@ -2,7 +2,7 @@ import DT, { type Config, type ConfigColumns } from 'datatables.net-dt' import DataTable from 'datatables.net-react' import React from 'react' -export type UiTableProperties = { +type UiTableProperties = { data: any // eslint-disable-line @typescript-eslint/no-explicit-any columns: ConfigColumns[] slots?: any // eslint-disable-line @typescript-eslint/no-explicit-any diff --git a/app/contexts/admin.tsx b/app/contexts/admin.tsx deleted file mode 100644 index 8b5384e..0000000 --- a/app/contexts/admin.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { - createContext, - useState, - useContext, - type PropsWithChildren, - type SetStateAction, - type Dispatch, -} from 'react' - -type AdminProfile = { - name: string -} - -type AdminContextProperties = { - adminProfile: AdminProfile - setAdminProfile: Dispatch> -} - -const AdminContext = createContext( - undefined, -) - -export const AdminProvider = ({ children }: PropsWithChildren) => { - const [adminProfile, setAdminProfile] = useState({ - name: 'Admin', - }) - - return ( - - {children} - - ) -} - -export const useAdminContext = (): AdminContextProperties => { - const context = useContext(AdminContext) - if (!context) { - throw new Error('useAdminContext must be used within a AdminProvider') - } - return context -} diff --git a/app/layouts/admin/menu.ts b/app/layouts/admin/menu.ts index 1d832df..36f57b7 100644 --- a/app/layouts/admin/menu.ts +++ b/app/layouts/admin/menu.ts @@ -5,8 +5,6 @@ import { ChartIcon } from '~/components/icons/chart' import { ChatIcon } from '~/components/icons/chat' import { DocumentIcon } from '~/components/icons/document' import { MedicalNotesIcon } from '~/components/icons/medical-notes' -import { ProfileIcon } from '~/components/icons/profile' -import { SettingIcon } from '~/components/icons/setting' type TMenu = { group: string @@ -61,16 +59,6 @@ export const MENU: TMenu[] = [ url: '/lg-admin/tags', icon: TagIcon, }, - { - title: 'Pengaturan', - url: '/lg-admin/settings', - icon: SettingIcon, - }, - { - title: 'Admin', - url: '/lg-admin/admins', - icon: ProfileIcon, - }, ], }, ] diff --git a/app/routes/_admin.lg-admin._dashboard.admins.tsx b/app/routes/_admin.lg-admin._dashboard.admins.tsx deleted file mode 100644 index 312cc47..0000000 --- a/app/routes/_admin.lg-admin._dashboard.admins.tsx +++ /dev/null @@ -1,2 +0,0 @@ -const DashboardAdminsLayout = () =>
Admins Page
-export default DashboardAdminsLayout diff --git a/app/routes/_admin.lg-admin._dashboard.settings.tsx b/app/routes/_admin.lg-admin._dashboard.settings.tsx deleted file mode 100644 index f4b9873..0000000 --- a/app/routes/_admin.lg-admin._dashboard.settings.tsx +++ /dev/null @@ -1,34 +0,0 @@ -import { Button } from '~/components/ui/button' - -const DashboardSettingsLayout = () => ( -
- {/* action sementara kategory */} -
- - - -
-
-) -export default DashboardSettingsLayout diff --git a/app/routes/_admin.lg-admin._dashboard.site-data.tsx b/app/routes/_admin.lg-admin._dashboard.site-data.tsx deleted file mode 100644 index 3c0702f..0000000 --- a/app/routes/_admin.lg-admin._dashboard.site-data.tsx +++ /dev/null @@ -1,2 +0,0 @@ -const DashboardSiteDataLayout = () =>
Site Data Page
-export default DashboardSiteDataLayout diff --git a/app/routes/_admin.lg-admin.tsx b/app/routes/_admin.lg-admin.tsx index b57949b..dbabe7a 100644 --- a/app/routes/_admin.lg-admin.tsx +++ b/app/routes/_admin.lg-admin.tsx @@ -4,7 +4,6 @@ import { getStaff } from '~/apis/admin/get-staff' import { getCategories } from '~/apis/common/get-categories' import { getTags } from '~/apis/common/get-tags' import { AUTH_PAGES } from '~/configs/pages' -import { AdminProvider } from '~/contexts/admin' import { AdminDefaultLayout } from '~/layouts/admin/default' import { handleCookie } from '~/libs/cookies' @@ -42,11 +41,9 @@ export const loader = async ({ request }: Route.LoaderArgs) => { const AdminLayout = () => { return ( - - - - - + + + ) } diff --git a/knip.json b/knip.json index 3f5075a..3c5aa68 100644 --- a/knip.json +++ b/knip.json @@ -9,7 +9,7 @@ "server.{js,ts}" ], "project": ["**/*.{js,cjs,mjs,jsx,ts,cts,mts,tsx}"], - "ignore": ["app/components/icons/*.tsx"], + "ignore": [], "ignoreDependencies": [ "tailwindcss", "@tailwindcss/typography",