feat: update popup data
This commit is contained in:
parent
1e4d324963
commit
65d1aaf3fe
|
|
@ -55,6 +55,7 @@ type HeroModalProps = {
|
||||||
group: string;
|
group: string;
|
||||||
poldaName?: string;
|
poldaName?: string;
|
||||||
satkerName?: string;
|
satkerName?: string;
|
||||||
|
dataContent?: any;
|
||||||
};
|
};
|
||||||
|
|
||||||
const HeroModal = ({
|
const HeroModal = ({
|
||||||
|
|
@ -62,6 +63,7 @@ const HeroModal = ({
|
||||||
group,
|
group,
|
||||||
poldaName,
|
poldaName,
|
||||||
satkerName,
|
satkerName,
|
||||||
|
dataContent,
|
||||||
}: HeroModalProps) => {
|
}: HeroModalProps) => {
|
||||||
const [heroData, setHeroData] = useState<any[]>([]);
|
const [heroData, setHeroData] = useState<any[]>([]);
|
||||||
const params = useParams();
|
const params = useParams();
|
||||||
|
|
@ -138,7 +140,7 @@ const HeroModal = ({
|
||||||
ref={modalRef}
|
ref={modalRef}
|
||||||
className="relative dark:bg-gray-900 rounded-lg w-[90%] md:w-[600px] p-4 shadow-none"
|
className="relative dark:bg-gray-900 rounded-lg w-[90%] md:w-[600px] p-4 shadow-none"
|
||||||
>
|
>
|
||||||
{heroData?.length > 0 && (
|
{dataContent?.length > 0 && (
|
||||||
<>
|
<>
|
||||||
<button
|
<button
|
||||||
className="absolute left-3 top-1/2 z-10 -translate-y-1/2 text-white text-3xl"
|
className="absolute left-3 top-1/2 z-10 -translate-y-1/2 text-white text-3xl"
|
||||||
|
|
@ -161,7 +163,7 @@ const HeroModal = ({
|
||||||
autoplay={{ delay: 3000 }}
|
autoplay={{ delay: 3000 }}
|
||||||
className="mySwiper w-full"
|
className="mySwiper w-full"
|
||||||
>
|
>
|
||||||
{heroData.map((list: any) => (
|
{dataContent.map((list: any) => (
|
||||||
<SwiperSlide key={list?.id}>
|
<SwiperSlide key={list?.id}>
|
||||||
<div className="relative h-[310px] lg:h-[420px]">
|
<div className="relative h-[310px] lg:h-[420px]">
|
||||||
<button
|
<button
|
||||||
|
|
@ -458,6 +460,7 @@ const HeroNew = (props: { group?: string }) => {
|
||||||
group={props.group || "mabes"}
|
group={props.group || "mabes"}
|
||||||
poldaName={poldaName as string}
|
poldaName={poldaName as string}
|
||||||
satkerName={satkerName as string}
|
satkerName={satkerName as string}
|
||||||
|
dataContent={content}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue