feat: update getNews API query handling and enhance social share button styles

This commit is contained in:
Ardeman 2025-03-25 00:21:09 +08:00
parent fa5f7fbe92
commit 724a14d741
3 changed files with 12 additions and 6 deletions

View File

@ -55,7 +55,7 @@ export const getNews = async (parameters?: TParameters) => {
...(active && { active }),
...(limit && { limit }),
...(page && { page }),
...(query && { q: query.split(' ').join('+') }),
...(query && { q: query }),
},
})
return dataResponseSchema.parse(data)

View File

@ -39,7 +39,7 @@ export const SocialShareButtons = ({
onClick={handleCopyLink}
className="relative cursor-pointer"
>
<LinkIcon className="size-8 rounded-full bg-[#F4F4F4] p-2 sm:h-10 sm:w-10" />
<LinkIcon className="size-8 rounded-full bg-[#F4F4F4] p-2 transition hover:bg-gray-200 hover:shadow active:bg-gray-300 sm:h-10 sm:w-10" />
{showPopup && (
<div className="absolute top-12 w-48 rounded-lg border-2 border-gray-400 bg-white p-2 shadow-lg">
Link berhasil disalin!
@ -51,28 +51,28 @@ export const SocialShareButtons = ({
url={url}
title={title}
>
<FacebookIcon className="size-8 rounded-full bg-[#F4F4F4] p-2 sm:h-10 sm:w-10" />
<FacebookIcon className="size-8 rounded-full bg-[#F4F4F4] p-2 transition hover:bg-gray-200 hover:shadow active:bg-gray-300 sm:h-10 sm:w-10" />
</FacebookShareButton>
<LinkedinShareButton
url={url}
title={title}
>
<LinkedinIcon className="size-8 rounded-full bg-[#F4F4F4] p-2 sm:h-10 sm:w-10" />
<LinkedinIcon className="size-8 rounded-full bg-[#F4F4F4] p-2 transition hover:bg-gray-200 hover:shadow active:bg-gray-300 sm:h-10 sm:w-10" />
</LinkedinShareButton>
<TwitterShareButton
url={url}
title={title}
>
<XIcon className="size-8 rounded-full bg-[#F4F4F4] p-2 sm:h-10 sm:w-10" />
<XIcon className="size-8 rounded-full bg-[#F4F4F4] p-2 transition hover:bg-gray-200 hover:shadow active:bg-gray-300 sm:h-10 sm:w-10" />
</TwitterShareButton>
<button
onClick={handleInstagramShare}
className="cursor-pointer"
>
<InstagramIcon className="size-8 rounded-full bg-[#F4F4F4] p-2 sm:h-10 sm:w-10" />
<InstagramIcon className="size-8 rounded-full bg-[#F4F4F4] p-2 transition hover:bg-gray-200 hover:shadow active:bg-gray-300 sm:h-10 sm:w-10" />
</button>
</div>
)

View File

@ -1,4 +1,5 @@
import {
BriefcaseIcon,
ChartBarSquareIcon,
ClipboardDocumentCheckIcon,
DocumentCurrencyDollarIcon,
@ -68,6 +69,11 @@ export const MENU: TMenu[] = [
url: '/lg-admin/subscribe-plan',
icon: DocumentCurrencyDollarIcon,
},
{
title: 'Staff',
url: '/lg-admin/staffs',
icon: BriefcaseIcon,
},
],
},
]