feat: update getNews API query handling and enhance social share button styles
This commit is contained in:
parent
fa5f7fbe92
commit
724a14d741
@ -55,7 +55,7 @@ export const getNews = async (parameters?: TParameters) => {
|
|||||||
...(active && { active }),
|
...(active && { active }),
|
||||||
...(limit && { limit }),
|
...(limit && { limit }),
|
||||||
...(page && { page }),
|
...(page && { page }),
|
||||||
...(query && { q: query.split(' ').join('+') }),
|
...(query && { q: query }),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
return dataResponseSchema.parse(data)
|
return dataResponseSchema.parse(data)
|
||||||
|
|||||||
@ -39,7 +39,7 @@ export const SocialShareButtons = ({
|
|||||||
onClick={handleCopyLink}
|
onClick={handleCopyLink}
|
||||||
className="relative cursor-pointer"
|
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 && (
|
{showPopup && (
|
||||||
<div className="absolute top-12 w-48 rounded-lg border-2 border-gray-400 bg-white p-2 shadow-lg">
|
<div className="absolute top-12 w-48 rounded-lg border-2 border-gray-400 bg-white p-2 shadow-lg">
|
||||||
Link berhasil disalin!
|
Link berhasil disalin!
|
||||||
@ -51,28 +51,28 @@ export const SocialShareButtons = ({
|
|||||||
url={url}
|
url={url}
|
||||||
title={title}
|
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>
|
</FacebookShareButton>
|
||||||
|
|
||||||
<LinkedinShareButton
|
<LinkedinShareButton
|
||||||
url={url}
|
url={url}
|
||||||
title={title}
|
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>
|
</LinkedinShareButton>
|
||||||
|
|
||||||
<TwitterShareButton
|
<TwitterShareButton
|
||||||
url={url}
|
url={url}
|
||||||
title={title}
|
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>
|
</TwitterShareButton>
|
||||||
|
|
||||||
<button
|
<button
|
||||||
onClick={handleInstagramShare}
|
onClick={handleInstagramShare}
|
||||||
className="cursor-pointer"
|
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>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
import {
|
import {
|
||||||
|
BriefcaseIcon,
|
||||||
ChartBarSquareIcon,
|
ChartBarSquareIcon,
|
||||||
ClipboardDocumentCheckIcon,
|
ClipboardDocumentCheckIcon,
|
||||||
DocumentCurrencyDollarIcon,
|
DocumentCurrencyDollarIcon,
|
||||||
@ -68,6 +69,11 @@ export const MENU: TMenu[] = [
|
|||||||
url: '/lg-admin/subscribe-plan',
|
url: '/lg-admin/subscribe-plan',
|
||||||
icon: DocumentCurrencyDollarIcon,
|
icon: DocumentCurrencyDollarIcon,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
title: 'Staff',
|
||||||
|
url: '/lg-admin/staffs',
|
||||||
|
icon: BriefcaseIcon,
|
||||||
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user