fix:disable button

This commit is contained in:
Rama Priyanto 2025-06-09 16:56:30 +07:00
parent 3c5ce29060
commit a3538d1322
3 changed files with 53 additions and 44 deletions

View File

@ -21,6 +21,14 @@ export default function BasicPage() {
<AddIcon />
</Button>
</Link> */}
<Button
size="md"
className="bg-[#F07C00] text-white w-full lg:w-fit"
isDisabled
>
Tambah Artikel
<AddIcon />
</Button>
<ArticleTable />
</div>
</div>

View File

@ -176,7 +176,7 @@ export default function MasterCategoryTable() {
<div className="overflow-x-hidden overflow-y-scroll">
<div className="px-2 md:px-4 md:py-4 w-full">
<div className="bg-white shadow-lg dark:bg-[#18181b] rounded-xl p-3">
{/* <Button
<Button
size="md"
className="bg-[#F07C00] text-white w-full lg:w-fit"
onPress={onOpen}
@ -184,7 +184,7 @@ export default function MasterCategoryTable() {
>
Tambah Kategori
<AddIcon />
</Button> */}
</Button>
<CategoriesTable triggerRefresh={refresh} />
</div>
</div>

View File

@ -82,7 +82,7 @@ export default function HeaderNews() {
<div className="w-full">
<div className="flex flex-col lg:flex-row gap-3 lg:gap-8 bg-white dark:bg-black p-1 lg:p-8 lg:h-[540px] w-full lg:w-[75%] lg:mx-auto">
<div className="lg:hidden w-[90%] h-[300px] md:h-[500px] mx-auto">
{banner.length > 0 ? (
{banner?.length > 0 ? (
<Swiper
centeredSlides={true}
autoplay={{
@ -222,7 +222,7 @@ export default function HeaderNews() {
</div>
<div className="hidden lg:block w-full lg:w-[50%] h-[500px]">
{banner.length > 0 ? (
{banner?.length > 0 ? (
<Swiper
centeredSlides={true}
autoplay={{
@ -249,48 +249,49 @@ export default function HeaderNews() {
);
}}
>
{banner.map((newsItem: any, index: number) => (
<SwiperSlide key={newsItem?.id} className="!w-full h-[50vh]">
<Card
isFooterBlurred
radius="lg"
className="border-none h-[50vh] lg:h-[500px] shadow-none"
>
<Image
alt="headernews"
src={
newsItem?.thumbnailUrl == ""
? "/no-image.jpg"
: newsItem?.thumbnailUrl
}
className="!w-full !h-[500px] !object-cover !rounded-none"
/>
{banner?.lenth > 0 &&
banner.map((newsItem: any, index: number) => (
<SwiperSlide key={newsItem?.id} className="!w-full h-[50vh]">
<Card
isFooterBlurred
radius="lg"
className="border-none h-[50vh] lg:h-[500px] shadow-none"
>
<Image
alt="headernews"
src={
newsItem?.thumbnailUrl == ""
? "/no-image.jpg"
: newsItem?.thumbnailUrl
}
className="!w-full !h-[500px] !object-cover !rounded-none"
/>
<CardFooter className="mb-1 max-h-[20vh] before:bg-white/10 border-white/20 border-1 overflow-hidden py-1 md:absolute before:rounded-xl rounded-large bottom-1 w-[calc(100%_-_8px)] shadow-small ml-1 z-10">
<div className="text-white">
<Link
href={`news/detail/${newsItem.id}-${newsItem?.slug}`}
>
<p className="text-left font-semibold text-lg lg:text-2xl">
{textEllipsis(newsItem.title, 40)}
</p>
</Link>
<div className="flex flex-row gap-1">
<p className="py-[2px] text-left text-sm">
{convertDateFormat(newsItem.createdAt)} WIB
</p>
<p className="flex items-center gap-1 text-sm">
<EyeIcon />
{newsItem.viewCount === null
? 0
: newsItem.viewCount}
</p>
<CardFooter className="mb-1 max-h-[20vh] before:bg-white/10 border-white/20 border-1 overflow-hidden py-1 md:absolute before:rounded-xl rounded-large bottom-1 w-[calc(100%_-_8px)] shadow-small ml-1 z-10">
<div className="text-white">
<Link
href={`news/detail/${newsItem.id}-${newsItem?.slug}`}
>
<p className="text-left font-semibold text-lg lg:text-2xl">
{textEllipsis(newsItem.title, 40)}
</p>
</Link>
<div className="flex flex-row gap-1">
<p className="py-[2px] text-left text-sm">
{convertDateFormat(newsItem.createdAt)} WIB
</p>
<p className="flex items-center gap-1 text-sm">
<EyeIcon />
{newsItem.viewCount === null
? 0
: newsItem.viewCount}
</p>
</div>
</div>
</div>
</CardFooter>
</Card>
</SwiperSlide>
))}
</CardFooter>
</Card>
</SwiperSlide>
))}
</Swiper>
) : (
<Skeleton className="rounded-lg">