fix: href link in card filter

This commit is contained in:
Sabda Yagra 2025-09-19 13:57:06 +07:00
parent 9cf5498c88
commit 683c4cc465
4 changed files with 10 additions and 13 deletions

View File

@ -243,7 +243,8 @@ export default function FilterAudioComponent(props: {
{newContent?.map((audio: any) => (
<CarouselItem key={audio?.id} className="md:basis-1/2 lg:basis-1/3">
<Link
href={prefixPath + `/audio/detail/${audio?.slug}`}
href={`${prefixPath}/audio/detail/${audio?.slug}`}
// href={prefixPath + `/audio/detail/${audio?.slug}`}
// onClick={() =>
// router.push(prefixPath + `/audio/detail/${audio?.slug}`)
// }

View File

@ -214,7 +214,8 @@ export default function FilterDocumentComponent(props: {
{newContent?.map((text: any) => (
<CarouselItem key={text?.id} className="md:basis-1/2 lg:basis-1/3">
<Link
href={prefixPath + `/document/detail/${text?.slug}`}
href={`${prefixPath}/text/detail/${text?.slug}`}
// href={prefixPath + `/document/detail/${text?.slug}`}
// onClick={() =>
// router.push(prefixPath + `/document/detail/${text?.slug}`)
// }

View File

@ -157,17 +157,11 @@ export default function FilterImageComponent(props: {
}${endDateString ? `&endDate=${endDateString}` : ""}`;
const href = `${basePath}/image/${fullQuery}`;
// let prefixPath = poldaName
// ? `/polda/${poldaName}`
// : satkerName
// ? `/satker/${satkerName}`
// : "";
let prefixPath = poldaName
? `/polda/${poldaName}/image/detail`
? `/polda/${poldaName}`
: satkerName
? `/satker/${satkerName}/image/detail`
: `/image/detail`;
? `/satker/${satkerName}`
: "";
return newContent?.length > 0 ? (
<div className="flex flex-col gap-3 w-full">
@ -206,7 +200,7 @@ export default function FilterImageComponent(props: {
{newContent?.map((image: any) => (
<CarouselItem key={image?.id} className="md:basis-1/2 lg:basis-1/3">
<Link
href={`${prefixPath}/${image?.slug}`}
href={`${prefixPath}/image/detail/${image?.slug}`}
// onClick={() =>
// router.push(prefixPath + `/image/detail/${image?.slug}`)
// }

View File

@ -161,7 +161,8 @@ export default function FilterVideoComponent(props: {
{newContent?.map((video: any) => (
<CarouselItem key={video?.id} className="md:basis-1/2 lg:basis-1/3">
<Link
href={prefixPath + `/video/detail/${video?.slug}`}
href={`${prefixPath}/video/detail/${video?.slug}`}
// href={prefixPath + `/video/detail/${video?.slug}`}
// onClick={() =>
// router.push(prefixPath + `/video/detail/${video?.slug}`)
// }