From 0d3d21f2a776ec74e9b62eff4e53124d53902f4c Mon Sep 17 00:00:00 2001 From: suvam Date: Fri, 4 Oct 2024 05:25:26 +0530 Subject: [PATCH] fixed it to dynamic img url accepts from props --- src/app/trekking/page.tsx | 289 ++++++++++++++++++++++--------------- src/components/ui/Card.tsx | 59 ++++---- 2 files changed, 203 insertions(+), 145 deletions(-) diff --git a/src/app/trekking/page.tsx b/src/app/trekking/page.tsx index 23dfcc1..b6235d1 100644 --- a/src/app/trekking/page.tsx +++ b/src/app/trekking/page.tsx @@ -1,127 +1,176 @@ -import styles from "./page.module.css" -import Image from "next/image" +import styles from "./page.module.css"; +import Image from "next/image"; import Card from "@/components/ui/Card"; -import TrekkingHeroImage from "/public/heroImage.png" +import TrekkingHeroImage from "/public/heroImage.png"; export default function Trekking() { - return (<> -
- -
-
-

Trekking

-

EXPLORE HIDDEN PLACES IN UTTARAKHAND

-
-
- TREKKING -
-
- - -
-
-
-
- -
-
- -
-
-
-
-
- -
- - - - - - - - - - - - - - - - - - - - - + return ( + <> +
+
+
+

Trekking

+

EXPLORE HIDDEN PLACES IN UTTARAKHAND

+
+
+ TREKKING +
+
+ +
+
+
+
+
+
+
+
- - ); +
+
+
+ +
+ + + + + + + + + + + + + + + + + + + + + +
+ + ); } diff --git a/src/components/ui/Card.tsx b/src/components/ui/Card.tsx index 7c4025a..e26c90a 100644 --- a/src/components/ui/Card.tsx +++ b/src/components/ui/Card.tsx @@ -1,32 +1,41 @@ import Image from "next/image"; import styles from "./Card.module.css"; import Link from "next/link"; -import Roopkund from "/public/roopkund.jpg" - type CardProps = { - title: string; - subTitle: string; - description: string; - image: string; - readMoreLink?: string -} + title: string; + subTitle: string; + description: string; + image: string; + readMoreLink?: string; +}; export default function Card(props: CardProps) { - return( -
-
-

{props.title}

-

{props.subTitle}

-

{props.description}

-
-
READ MORE
-
VIEW LOCATION
-
-
-
- {""} -
-
- ); -} \ No newline at end of file + return ( +
+
+

{props.title}

+

{props.subTitle}

+

{props.description}

+
+
+ READ MORE +
+
+ + VIEW LOCATION + +
+
+
+
+ {props.title} +
+
+ ); +}