refactor: remove unused icon components and update menu to use new icons

This commit is contained in:
Ardeman 2025-03-12 08:52:23 +08:00
parent c5b611a300
commit 90e2042a91
4 changed files with 8 additions and 77 deletions

View File

@ -1,23 +0,0 @@
import type { JSX, SVGProps } from 'react'
export const ChartIcon = (
properties: JSX.IntrinsicAttributes & SVGProps<SVGSVGElement>,
) => {
return (
<svg
width={18}
height={19}
viewBox="0 0 18 19"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...properties}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M5.498 1.61h7.004c2.55 0 3.99 1.447 3.998 3.998v7.005c0 2.55-1.447 3.997-3.998 3.997H5.498c-2.551 0-3.998-1.447-3.998-3.997V5.608c0-2.55 1.447-3.998 3.998-3.998zm3.539 11.895a.62.62 0 00.623-.562V5.3a.612.612 0 00-.285-.592.63.63 0 00-.96.592v7.643a.632.632 0 00.622.562zm3.45 0c.316 0 .585-.24.623-.562v-2.46a.629.629 0 00-.96-.593.604.604 0 00-.285.593v2.46c.03.322.3.562.623.562zm-6.322-.562a.62.62 0 01-.623.562.62.62 0 01-.622-.562V7.76a.63.63 0 01.293-.592.617.617 0 01.66 0c.202.127.315.36.292.592v5.183z"
fill="currentColor"
/>
</svg>
)
}

View File

@ -1,23 +0,0 @@
import type { JSX, SVGProps } from 'react'
export const ChatIcon = (
properties: JSX.IntrinsicAttributes & SVGProps<SVGSVGElement>,
) => {
return (
<svg
width={18}
height={19}
viewBox="0 0 18 19"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...properties}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M1.5 9.122C1.5 5.17 4.657 1.61 9.015 1.61c4.26 0 7.485 3.493 7.485 7.49 0 4.633-3.78 7.51-7.5 7.51-1.23 0-2.595-.33-3.69-.976-.382-.233-.705-.406-1.117-.27l-1.515.45c-.383.12-.728-.18-.615-.586l.502-1.682a.786.786 0 00-.052-.676C1.868 11.683 1.5 10.384 1.5 9.122zm6.525 0c0 .533.427.961.96.969a.963.963 0 000-1.923.956.956 0 00-.96.954zm3.457.007c0 .526.428.962.96.962a.963.963 0 000-1.923.958.958 0 00-.96.961zm-5.954.962a.967.967 0 01-.96-.962c0-.533.427-.961.96-.961.532 0 .96.428.96.961a.967.967 0 01-.96.962z"
fill="currentColor"
/>
</svg>
)
}

View File

@ -1,23 +0,0 @@
import type { JSX, SVGProps } from 'react'
export const DocumentIcon = (
properties: JSX.IntrinsicAttributes & SVGProps<SVGSVGElement>,
) => {
return (
<svg
width={18}
height={19}
viewBox="0 0 18 19"
fill="none"
xmlns="http://www.w3.org/2000/svg"
{...properties}
>
<path
fillRule="evenodd"
clipRule="evenodd"
d="M5.857 1.61h6.286c2.317 0 3.607 1.335 3.607 3.623v7.747c0 2.325-1.29 3.63-3.607 3.63H5.857c-2.28 0-3.607-1.305-3.607-3.63V5.233c0-2.288 1.328-3.623 3.607-3.623zm.203 3.495v-.007h2.242a.588.588 0 010 1.178H6.06a.585.585 0 010-1.17zm0 4.56h5.88a.586.586 0 000-1.17H6.06a.586.586 0 000 1.17zm0 3.428h5.88c.3-.03.525-.286.525-.585a.588.588 0 00-.525-.593H6.06a.596.596 0 00-.563.908c.12.187.338.3.563.27z"
fill="currentColor"
/>
</svg>
)
}

View File

@ -1,15 +1,15 @@
import {
ChartBarSquareIcon,
ClipboardDocumentCheckIcon,
DocumentCurrencyDollarIcon,
MegaphoneIcon,
NewspaperIcon,
PresentationChartLineIcon,
TagIcon,
UsersIcon,
} from '@heroicons/react/20/solid'
import type { SVGProps } from 'react'
import { ChartIcon } from '~/components/icons/chart'
import { ChatIcon } from '~/components/icons/chat'
import { DocumentIcon } from '~/components/icons/document'
type TMenu = {
group: string
items: {
@ -26,17 +26,17 @@ export const MENU: TMenu[] = [
{
title: 'Dashboard',
url: '/lg-admin',
icon: ChartIcon,
icon: ChartBarSquareIcon,
},
{
title: 'User',
url: '/lg-admin/users',
icon: DocumentIcon,
icon: UsersIcon,
},
{
title: 'Artikel',
url: '/lg-admin/contents',
icon: ChatIcon,
icon: NewspaperIcon,
},
{
title: 'Banner Iklan',
@ -46,7 +46,7 @@ export const MENU: TMenu[] = [
{
title: 'Subscription',
url: '/lg-admin/subscriptions',
icon: ChartIcon,
icon: PresentationChartLineIcon,
},
],
},