From ee4cad5474ba2d9f30e6ffd6157c2fb84ce01acc Mon Sep 17 00:00:00 2001 From: Emil Gulamov <125820963+mearashadowfax@users.noreply.github.com> Date: Sun, 11 Feb 2024 23:54:35 +0400 Subject: [PATCH] Add type definitions to HeroSection variables The commit provides type definitions for the variables in the HeroSection component. By doing so, this enhances readability and maintainability of the codebase and helps the developers understand what kind of data each variable is intended to hold. --- src/components/HeroSection.astro | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/components/HeroSection.astro b/src/components/HeroSection.astro index ed3936a..8b9738d 100644 --- a/src/components/HeroSection.astro +++ b/src/components/HeroSection.astro @@ -9,29 +9,29 @@ import FullStar from "./ui/stars/FullStar.astro"; import HalfStar from "./ui/stars/HalfStar.astro"; /* `title` variable used to customise the main heading. */ -const title = `Equip Your Projects with ScrewFast`; /* `subTitle` variable used to customise the sub-heading text. */ -const subTitle = +const subTitle:string = "Top-quality hardware tools and expert construction services for every project need."; /* `primaryBtn` and `primaryBtnURL` variables used to customise the text and target link of the primary button. */ -const primaryBtn = "Start Exploring"; -const primaryBtnURL = "#"; +const primaryBtn:string = "Start Exploring"; +const primaryBtnURL:string = "#"; /* `secondaryBtn` and `secondaryBtnURL` variables used to customise the text and target link of the secondary button. */ -const secondaryBtn = "Contact Sales Team"; -const secondaryBtnURL = "#"; +const secondaryBtn:string = "Contact Sales Team"; +const secondaryBtnURL:string = "#"; /* `rating` variable used to customise the rating. */ -const rating = 4.8; +const rating:number = 4.8; /* `starCount` variable used to customise the star rating with the full stars. */ -const starCount = 4; +const starCount:number = 4; /* `reviews` variable used to customise the number of reviews. */ -const reviews = "12.8k"; +const reviews:string = "12.8k"; /* In the above, the title, subTitle, primaryBtn, primaryBtnURL, secondaryBtn, secondaryBtnURL, rating, starCount, reviews, and imageSource attributes are variables part of the HeroSection component.