fix: bugs in ladning and icon tenant setting

This commit is contained in:
Sabda Yagra 2026-03-09 12:19:53 +07:00
parent 24b44a491a
commit 7a9656714e
2 changed files with 107 additions and 108 deletions

View File

@ -208,7 +208,7 @@ function TenantSettingsContentTable() {
</p> </p>
</div> </div>
<div className="flex items-center gap-2"> <div className="flex items-center gap-2">
<SettingsIcon className="h-6 w-6 text-gray-500" /> {/* <SettingsIcon className="h-6 w-6 text-gray-500" /> */}
{/* <Button variant="outline" size="sm" onClick={checkWorkflowStatus}> {/* <Button variant="outline" size="sm" onClick={checkWorkflowStatus}>
Check Workflow Status Check Workflow Status
</Button> */} </Button> */}

View File

@ -137,8 +137,8 @@ export default function Header() {
}, [bookmarkedIds]); }, [bookmarkedIds]);
return ( return (
<RevealR> <section className="max-w-[1350px] mx-auto px-4">
<section className="max-w-[1350px] mx-auto px-4"> <RevealR>
<div className="flex flex-col lg:flex-row gap-6 py-6"> <div className="flex flex-col lg:flex-row gap-6 py-6">
{data.length > 0 && ( {data.length > 0 && (
<Card <Card
@ -150,7 +150,6 @@ export default function Header() {
} }
/> />
)} )}
<div className="grid grid-cols-1 sm:grid-cols-2 gap-4 w-full"> <div className="grid grid-cols-1 sm:grid-cols-2 gap-4 w-full">
{data.slice(1, 5).map((item) => ( {data.slice(1, 5).map((item) => (
<Card <Card
@ -164,44 +163,44 @@ export default function Header() {
))} ))}
</div> </div>
</div> </div>
</RevealR>
<div className="relative w-full h-48 sm:h-64 md:h-80 lg:h-[460px] mt-4 rounded-xl overflow-hidden"> <div className="relative w-full h-48 sm:h-64 md:h-80 lg:h-[460px] mt-4 rounded-xl overflow-hidden">
<Swiper <Swiper
modules={[Navigation, Pagination]} modules={[Navigation, Pagination]}
navigation navigation
pagination={{ clickable: true }} pagination={{ clickable: true }}
spaceBetween={10} spaceBetween={10}
slidesPerView={1} slidesPerView={1}
loop={true} loop={true}
className="w-full h-full" className="w-full h-full"
> >
{images.map((img, index) => ( {images.map((img, index) => (
<SwiperSlide key={index}> <SwiperSlide key={index}>
<div className="relative w-full h-48 sm:h-64 md:h-80 lg:h-[460px]"> <div className="relative w-full h-48 sm:h-64 md:h-80 lg:h-[460px]">
{/* <Image {/* <Image
src={img} src={img}
alt={`slide-${index}`} alt={`slide-${index}`}
fill fill
className="object-cover rounded-xl" className="object-cover rounded-xl"
priority={index === 0} priority={index === 0}
/> */} /> */}
<ImageBlurry <ImageBlurry
priority priority
src={img} src={img}
alt="gambar" alt="gambar"
style={{ style={{
objectFit: "contain", objectFit: "contain",
width: "100%", width: "100%",
height: "100%", height: "100%",
}} }}
/> />
</div> </div>
</SwiperSlide> </SwiperSlide>
))} ))}
</Swiper> </Swiper>
</div> </div>
</section> </section>
</RevealR>
); );
} }
@ -311,92 +310,92 @@ function Card({
}; };
return ( return (
<RevealL> // <RevealL>
<div
className={`rounded-xl overflow-hidden shadow hover:shadow-lg transition-all bg-white dark:bg-black dark:border dark:border-slate-50 ${
isBig
? "w-full lg:max-w-[670px] lg:min-h-[680px]"
: "w-full h-[350px] md:h-[330px]"
}`}
>
<div <div
className={`rounded-xl overflow-hidden shadow hover:shadow-lg transition-all bg-white dark:bg-black dark:border dark:border-slate-50 ${ className={`relative ${
isBig isBig ? "aspect-[3/2] lg:h-[525px]" : "aspect-video"
? "w-full lg:max-w-[670px] lg:min-h-[680px]" } w-full`}
: "w-full h-[350px] md:h-[330px]"
}`}
> >
<div <Link href={getLink()}>
className={`relative ${ {/* <Image
isBig ? "aspect-[3/2] lg:h-[525px]" : "aspect-video"
} w-full`}
>
<Link href={getLink()}>
{/* <Image
src={item.smallThumbnailLink || "/contributor.png"} src={item.smallThumbnailLink || "/contributor.png"}
alt={item.title} alt={item.title}
fill fill
className="object-cover" className="object-cover"
/> */} /> */}
<ImageBlurry <ImageBlurry
src={imageSrc} src={imageSrc}
alt={item.title} alt={item.title}
className="w-full h-full object-contain" className="w-full h-full object-contain"
/> />
</Link> </Link>
</div>
<div className="py-[26px] px-4 space-y-2">
<div className="flex justify-between items-center gap-2 text-xs font-semibold flex-row">
<span className="bg-emerald-600 text-white px-2 py-0.5 rounded">
{item.clientName}
</span>
<span className="text-orange-600">
{item.categories?.map((cat: any) => cat.title).join(", ")}
</span>
</div> </div>
<div className="py-[26px] px-4 space-y-2"> <div className="text-xs text-gray-500">
<div className="flex justify-between items-center gap-2 text-xs font-semibold flex-row"> {new Date(item.createdAt)
<span className="bg-emerald-600 text-white px-2 py-0.5 rounded"> .toLocaleString("id-ID", {
{item.clientName} day: "2-digit",
</span> month: "short",
<span className="text-orange-600"> year: "numeric",
{item.categories?.map((cat: any) => cat.title).join(", ")} hour: "2-digit",
</span> minute: "2-digit",
hour12: false,
timeZone: "Asia/Jakarta",
})
.replace(".", ":")}{" "}
WIB
</div>
<Link href={getLink()}>
<h3 className="text-sm font-semibold leading-snug line-clamp-2">
{item.title}
</h3>
</Link>
<div className="flex justify-between items-center pt-2">
<div className="flex gap-2 text-gray-500">
<ThumbsUp
size={18}
className="cursor-pointer hover:text-[#F60100]"
/>
<ThumbsDown
size={18}
className="cursor-pointer hover:text-red-600"
/>
</div> </div>
<div className="text-xs text-gray-500"> <button
{new Date(item.createdAt) onClick={handleSave}
.toLocaleString("id-ID", { disabled={isSaving || isBookmarked}
day: "2-digit", className={`text-sm px-3 py-1 rounded-md transition-all duration-200 ${
month: "short", isBookmarked
year: "numeric", ? "bg-gray-400 text-white cursor-not-allowed"
hour: "2-digit", : "bg-[#F60100] text-white hover:bg-[#c90000]"
minute: "2-digit", }`}
hour12: false, >
timeZone: "Asia/Jakarta", {isSaving ? t("saving") : isBookmarked ? t("saved") : t("save")}
}) </button>
.replace(".", ":")}{" "}
WIB
</div>
<Link href={getLink()}>
<h3 className="text-sm font-semibold leading-snug line-clamp-2">
{item.title}
</h3>
</Link>
<div className="flex justify-between items-center pt-2">
<div className="flex gap-2 text-gray-500">
<ThumbsUp
size={18}
className="cursor-pointer hover:text-[#F60100]"
/>
<ThumbsDown
size={18}
className="cursor-pointer hover:text-red-600"
/>
</div>
<button
onClick={handleSave}
disabled={isSaving || isBookmarked}
className={`text-sm px-3 py-1 rounded-md transition-all duration-200 ${
isBookmarked
? "bg-gray-400 text-white cursor-not-allowed"
: "bg-[#F60100] text-white hover:bg-[#c90000]"
}`}
>
{isSaving ? t("saving") : isBookmarked ? t("saved") : t("save")}
</button>
</div>
</div> </div>
</div> </div>
</RevealL> </div>
// </RevealL>
); );
} }