diff --git a/src/components/sections/landing/HeroSection.astro b/src/components/sections/landing/HeroSection.astro index b5b1978..61b4e25 100644 --- a/src/components/sections/landing/HeroSection.astro +++ b/src/components/sections/landing/HeroSection.astro @@ -4,9 +4,7 @@ import { Image } from "astro:assets"; import heroImage from "../../../images/hero-image.avif"; import PrimaryCTA from "../../ui/buttons/PrimaryCTA.astro"; import SecondaryCTA from "../../ui/buttons/SecondaryCTA.astro"; -import Avatar from "../../ui/avatars/Avatar.astro"; -import FullStar from "../../ui/stars/FullStar.astro"; -import HalfStar from "../../ui/stars/HalfStar.astro"; +import ReviewComponent from "../../ui/blocks/ReviewComponent.astro"; // Define props from Astro const { @@ -18,7 +16,7 @@ const { secondaryBtnURL, withReview, avatars, - starCount = 0, + starCount, rating, reviews } = Astro.props; @@ -71,52 +69,10 @@ interface Props { { withReview ? ( -
-
-
-
- -
- { avatars?.map(src => ) } - - 7k+ - -
-
-
-
- -
-
-
- - { - Array(starCount).fill(0).map((_, i) => ) - } - - -
-

- -

-
-
-

- -

-
-
-
-
-
) : "" } - + + ) : "" } +
diff --git a/src/components/ui/blocks/ReviewComponent.astro b/src/components/ui/blocks/ReviewComponent.astro new file mode 100644 index 0000000..0791cf8 --- /dev/null +++ b/src/components/ui/blocks/ReviewComponent.astro @@ -0,0 +1,61 @@ +--- +import Avatar from "../../ui/avatars/Avatar.astro"; +import FullStar from "../../ui/stars/FullStar.astro"; +import HalfStar from "../../ui/stars/HalfStar.astro"; + +const { avatars, starCount = 0, rating, reviews } = Astro.props; + +interface Props { + avatars?: Array; + starCount?: number; + rating?: string; + reviews?: string; +} +--- + +
+
+
+
+ +
+ {avatars?.map((src) => )} + + 7k+ + +
+
+
+
+ +
+
+
+ + { + Array(starCount) + .fill(0) + .map((_, i) => ) + } + + +
+

+ +

+
+
+

+ +

+
+
+
+
+