fix: link hred in image-filter-card
This commit is contained in:
parent
f50d37f4de
commit
9cf5498c88
|
|
@ -54,7 +54,7 @@ export default function FilterAudioComponent(props: {
|
||||||
? `/polda/${poldaName}`
|
? `/polda/${poldaName}`
|
||||||
: satkerName
|
: satkerName
|
||||||
? `/satker/${satkerName}`
|
? `/satker/${satkerName}`
|
||||||
: "/";
|
: "";
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (searchType === "regional") {
|
if (searchType === "regional") {
|
||||||
|
|
@ -242,10 +242,11 @@ export default function FilterAudioComponent(props: {
|
||||||
<CarouselContent>
|
<CarouselContent>
|
||||||
{newContent?.map((audio: any) => (
|
{newContent?.map((audio: any) => (
|
||||||
<CarouselItem key={audio?.id} className="md:basis-1/2 lg:basis-1/3">
|
<CarouselItem key={audio?.id} className="md:basis-1/2 lg:basis-1/3">
|
||||||
<div
|
<Link
|
||||||
onClick={() =>
|
href={prefixPath + `/audio/detail/${audio?.slug}`}
|
||||||
router.push(prefixPath + `/audio/detail/${audio?.slug}`)
|
// onClick={() =>
|
||||||
}
|
// router.push(prefixPath + `/audio/detail/${audio?.slug}`)
|
||||||
|
// }
|
||||||
className="cursor-pointer bg-white dark:bg-black dark:border dark:border-gray-500 rounded-xl shadow-md hover:shadow-lg transition-shadow duration-300 overflow-hidden"
|
className="cursor-pointer bg-white dark:bg-black dark:border dark:border-gray-500 rounded-xl shadow-md hover:shadow-lg transition-shadow duration-300 overflow-hidden"
|
||||||
>
|
>
|
||||||
{/* Icon Background */}
|
{/* Icon Background */}
|
||||||
|
|
@ -273,7 +274,7 @@ export default function FilterAudioComponent(props: {
|
||||||
{audio?.title}
|
{audio?.title}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Link>
|
||||||
</CarouselItem>
|
</CarouselItem>
|
||||||
))}
|
))}
|
||||||
</CarouselContent>
|
</CarouselContent>
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ export default function FilterDocumentComponent(props: {
|
||||||
? `/polda/${poldaName}`
|
? `/polda/${poldaName}`
|
||||||
: satkerName
|
: satkerName
|
||||||
? `/satker/${satkerName}`
|
? `/satker/${satkerName}`
|
||||||
: "/";
|
: "";
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (searchType === "regional") {
|
if (searchType === "regional") {
|
||||||
|
|
@ -213,10 +213,11 @@ export default function FilterDocumentComponent(props: {
|
||||||
<CarouselContent>
|
<CarouselContent>
|
||||||
{newContent?.map((text: any) => (
|
{newContent?.map((text: any) => (
|
||||||
<CarouselItem key={text?.id} className="md:basis-1/2 lg:basis-1/3">
|
<CarouselItem key={text?.id} className="md:basis-1/2 lg:basis-1/3">
|
||||||
<div
|
<Link
|
||||||
onClick={() =>
|
href={prefixPath + `/document/detail/${text?.slug}`}
|
||||||
router.push(prefixPath + `/document/detail/${text?.slug}`)
|
// onClick={() =>
|
||||||
}
|
// router.push(prefixPath + `/document/detail/${text?.slug}`)
|
||||||
|
// }
|
||||||
className="cursor-pointer rounded-lg shadow-md overflow-hidden bg-white dark:bg-black dark:border dark:border-gray-500"
|
className="cursor-pointer rounded-lg shadow-md overflow-hidden bg-white dark:bg-black dark:border dark:border-gray-500"
|
||||||
>
|
>
|
||||||
{/* Ikon di tengah dengan latar kuning */}
|
{/* Ikon di tengah dengan latar kuning */}
|
||||||
|
|
@ -246,7 +247,7 @@ export default function FilterDocumentComponent(props: {
|
||||||
{text?.title}
|
{text?.title}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Link>
|
||||||
</CarouselItem>
|
</CarouselItem>
|
||||||
))}
|
))}
|
||||||
</CarouselContent>
|
</CarouselContent>
|
||||||
|
|
|
||||||
|
|
@ -157,11 +157,17 @@ export default function FilterImageComponent(props: {
|
||||||
}${endDateString ? `&endDate=${endDateString}` : ""}`;
|
}${endDateString ? `&endDate=${endDateString}` : ""}`;
|
||||||
const href = `${basePath}/image/${fullQuery}`;
|
const href = `${basePath}/image/${fullQuery}`;
|
||||||
|
|
||||||
|
// let prefixPath = poldaName
|
||||||
|
// ? `/polda/${poldaName}`
|
||||||
|
// : satkerName
|
||||||
|
// ? `/satker/${satkerName}`
|
||||||
|
// : "";
|
||||||
|
|
||||||
let prefixPath = poldaName
|
let prefixPath = poldaName
|
||||||
? `/polda/${poldaName}`
|
? `/polda/${poldaName}/image/detail`
|
||||||
: satkerName
|
: satkerName
|
||||||
? `/satker/${satkerName}`
|
? `/satker/${satkerName}/image/detail`
|
||||||
: "/";
|
: `/image/detail`;
|
||||||
|
|
||||||
return newContent?.length > 0 ? (
|
return newContent?.length > 0 ? (
|
||||||
<div className="flex flex-col gap-3 w-full">
|
<div className="flex flex-col gap-3 w-full">
|
||||||
|
|
@ -200,7 +206,7 @@ export default function FilterImageComponent(props: {
|
||||||
{newContent?.map((image: any) => (
|
{newContent?.map((image: any) => (
|
||||||
<CarouselItem key={image?.id} className="md:basis-1/2 lg:basis-1/3">
|
<CarouselItem key={image?.id} className="md:basis-1/2 lg:basis-1/3">
|
||||||
<Link
|
<Link
|
||||||
href={prefixPath + `/image/detail/${image?.slug}`}
|
href={`${prefixPath}/${image?.slug}`}
|
||||||
// onClick={() =>
|
// onClick={() =>
|
||||||
// router.push(prefixPath + `/image/detail/${image?.slug}`)
|
// router.push(prefixPath + `/image/detail/${image?.slug}`)
|
||||||
// }
|
// }
|
||||||
|
|
@ -212,7 +218,7 @@ export default function FilterImageComponent(props: {
|
||||||
// whileHover={{ scale: 0.95 }}
|
// whileHover={{ scale: 0.95 }}
|
||||||
// transition={{ duration: 0.3 }}
|
// transition={{ duration: 0.3 }}
|
||||||
>
|
>
|
||||||
{image?.thumbnailLink &&
|
{image?.thumbnailLink && (
|
||||||
<Image
|
<Image
|
||||||
priority={true}
|
priority={true}
|
||||||
// placeholder={`data:image/svg+xml;base64,${toBase64(
|
// placeholder={`data:image/svg+xml;base64,${toBase64(
|
||||||
|
|
@ -224,7 +230,7 @@ export default function FilterImageComponent(props: {
|
||||||
src={image?.thumbnailLink}
|
src={image?.thumbnailLink}
|
||||||
className="w-full h-full object-cover"
|
className="w-full h-full object-cover"
|
||||||
/>
|
/>
|
||||||
}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Badge category */}
|
{/* Badge category */}
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ export default function IndeksCarouselComponent(props: {
|
||||||
? `/polda/${poldaName}`
|
? `/polda/${poldaName}`
|
||||||
: satkerName
|
: satkerName
|
||||||
? `/satker/${satkerName}`
|
? `/satker/${satkerName}`
|
||||||
: "/";
|
: "";
|
||||||
|
|
||||||
// useEffect(() => {
|
// useEffect(() => {
|
||||||
// initFetch();
|
// initFetch();
|
||||||
|
|
@ -166,8 +166,8 @@ export default function IndeksCarouselComponent(props: {
|
||||||
<CarouselContent>
|
<CarouselContent>
|
||||||
{newContent.map((image: any) => (
|
{newContent.map((image: any) => (
|
||||||
<CarouselItem key={image?.id} className="md:basis-1/2 lg:basis-1/3">
|
<CarouselItem key={image?.id} className="md:basis-1/2 lg:basis-1/3">
|
||||||
<div
|
<Link href={`/indeks/detail/${image?.slug}`}
|
||||||
onClick={() => router.push(`/indeks/detail/${image?.slug}`)}
|
// onClick={() => router.push(`/indeks/detail/${image?.slug}`)}
|
||||||
className="cursor-pointer relative group overflow-hidden bg-white dark:bg-black dark:border dark:border-gray-500 rounded-xl shadow-md hover:shadow-lg transition-shadow duration-300"
|
className="cursor-pointer relative group overflow-hidden bg-white dark:bg-black dark:border dark:border-gray-500 rounded-xl shadow-md hover:shadow-lg transition-shadow duration-300"
|
||||||
>
|
>
|
||||||
<div className="w-full h-48 lg:h-60">
|
<div className="w-full h-48 lg:h-60">
|
||||||
|
|
@ -193,7 +193,7 @@ export default function IndeksCarouselComponent(props: {
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Link>
|
||||||
</CarouselItem>
|
</CarouselItem>
|
||||||
))}
|
))}
|
||||||
</CarouselContent>
|
</CarouselContent>
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ export default function FilterVideoComponent(props: {
|
||||||
? `/polda/${poldaName}`
|
? `/polda/${poldaName}`
|
||||||
: satkerName
|
: satkerName
|
||||||
? `/satker/${satkerName}`
|
? `/satker/${satkerName}`
|
||||||
: "/";
|
: "";
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (searchType === "regional") {
|
if (searchType === "regional") {
|
||||||
|
|
@ -160,10 +160,11 @@ export default function FilterVideoComponent(props: {
|
||||||
<CarouselContent>
|
<CarouselContent>
|
||||||
{newContent?.map((video: any) => (
|
{newContent?.map((video: any) => (
|
||||||
<CarouselItem key={video?.id} className="md:basis-1/2 lg:basis-1/3">
|
<CarouselItem key={video?.id} className="md:basis-1/2 lg:basis-1/3">
|
||||||
<div
|
<Link
|
||||||
onClick={() =>
|
href={prefixPath + `/video/detail/${video?.slug}`}
|
||||||
router.push(prefixPath + `/video/detail/${video?.slug}`)
|
// onClick={() =>
|
||||||
}
|
// router.push(prefixPath + `/video/detail/${video?.slug}`)
|
||||||
|
// }
|
||||||
className="cursor-pointer relative group overflow-hidden bg-white dark:bg-black dark:border dark:border-gray-500 rounded-xl shadow-md hover:shadow-lg transition-shadow duration-300"
|
className="cursor-pointer relative group overflow-hidden bg-white dark:bg-black dark:border dark:border-gray-500 rounded-xl shadow-md hover:shadow-lg transition-shadow duration-300"
|
||||||
>
|
>
|
||||||
{/* Image with motion effect */}
|
{/* Image with motion effect */}
|
||||||
|
|
@ -172,7 +173,7 @@ export default function FilterVideoComponent(props: {
|
||||||
// whileHover={{ scale: 0.95 }}
|
// whileHover={{ scale: 0.95 }}
|
||||||
// transition={{ duration: 0.3 }}
|
// transition={{ duration: 0.3 }}
|
||||||
>
|
>
|
||||||
{video?.thumbnailLink &&
|
{video?.thumbnailLink && (
|
||||||
<Image
|
<Image
|
||||||
priority={true}
|
priority={true}
|
||||||
// placeholder={`data:image/svg+xml;base64,${toBase64(
|
// placeholder={`data:image/svg+xml;base64,${toBase64(
|
||||||
|
|
@ -184,7 +185,7 @@ export default function FilterVideoComponent(props: {
|
||||||
src={video?.thumbnailLink}
|
src={video?.thumbnailLink}
|
||||||
className="w-full h-full object-cover"
|
className="w-full h-full object-cover"
|
||||||
/>
|
/>
|
||||||
}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{/* Badge category */}
|
{/* Badge category */}
|
||||||
|
|
@ -226,7 +227,7 @@ export default function FilterVideoComponent(props: {
|
||||||
</p>
|
</p>
|
||||||
*/}
|
*/}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</Link>
|
||||||
</CarouselItem>
|
</CarouselItem>
|
||||||
))}
|
))}
|
||||||
</CarouselContent>
|
</CarouselContent>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue