fix: fixing link href in content card filter
This commit is contained in:
parent
c661f8bbd2
commit
d647025a42
|
|
@ -1,5 +1,4 @@
|
||||||
"use client";
|
"use client";
|
||||||
"use client";
|
|
||||||
import React, { useEffect, useState } from "react";
|
import React, { useEffect, useState } from "react";
|
||||||
import { useForm, Controller } from "react-hook-form";
|
import { useForm, Controller } from "react-hook-form";
|
||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
|
|
|
||||||
|
|
@ -243,7 +243,10 @@ export default function FilterAudioComponent(props: {
|
||||||
{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">
|
||||||
<Link
|
<Link
|
||||||
href={`${prefixPath}${audio?.slug}`}
|
href={`${prefixPath}/audio/detail/${audio?.slug
|
||||||
|
?.split("/")
|
||||||
|
.pop()}`}
|
||||||
|
// href={`${prefixPath}/audio/detail/${audio?.slug}`}
|
||||||
// href={prefixPath + `/audio/detail/${audio?.slug}`}
|
// href={prefixPath + `/audio/detail/${audio?.slug}`}
|
||||||
// onClick={() =>
|
// onClick={() =>
|
||||||
// router.push(prefixPath + `/audio/detail/${audio?.slug}`)
|
// router.push(prefixPath + `/audio/detail/${audio?.slug}`)
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,10 @@ export default function FilterDocumentComponent(props: {
|
||||||
{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">
|
||||||
<Link
|
<Link
|
||||||
href={`${prefixPath}${text?.slug}`}
|
href={`${prefixPath}/text/detail/${text?.slug
|
||||||
|
?.split("/")
|
||||||
|
.pop()}`}
|
||||||
|
// href={`${prefixPath}/document/detail/${text?.slug}`}
|
||||||
// href={prefixPath + `/document/detail/${text?.slug}`}
|
// href={prefixPath + `/document/detail/${text?.slug}`}
|
||||||
// onClick={() =>
|
// onClick={() =>
|
||||||
// router.push(prefixPath + `/document/detail/${text?.slug}`)
|
// router.push(prefixPath + `/document/detail/${text?.slug}`)
|
||||||
|
|
|
||||||
|
|
@ -200,7 +200,10 @@ 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?.slug}`}
|
href={`${prefixPath}/image/detail/${image?.slug
|
||||||
|
?.split("/")
|
||||||
|
.pop()}`}
|
||||||
|
// href={prefixPath + `/image/detail/${image?.slug}`}
|
||||||
// onClick={() =>
|
// onClick={() =>
|
||||||
// router.push(prefixPath + `/image/detail/${image?.slug}`)
|
// router.push(prefixPath + `/image/detail/${image?.slug}`)
|
||||||
// }
|
// }
|
||||||
|
|
|
||||||
|
|
@ -161,7 +161,10 @@ export default function FilterVideoComponent(props: {
|
||||||
{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">
|
||||||
<Link
|
<Link
|
||||||
href={`${prefixPath}${video?.slug}`}
|
href={`${prefixPath}/video/detail/${video?.slug
|
||||||
|
?.split("/")
|
||||||
|
.pop()}`}
|
||||||
|
// href={`${prefixPath}/video/detail/${video?.slug}`}
|
||||||
// href={prefixPath + `/video/detail/${video?.slug}`}
|
// href={prefixPath + `/video/detail/${video?.slug}`}
|
||||||
// onClick={() =>
|
// onClick={() =>
|
||||||
// router.push(prefixPath + `/video/detail/${video?.slug}`)
|
// router.push(prefixPath + `/video/detail/${video?.slug}`)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue