fix header link
This commit is contained in:
parent
fc97d6463b
commit
eb7cdda70a
|
|
@ -1,8 +1,13 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
|
import { Link, useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
const HeroSection = () => {
|
const HeroSection = () => {
|
||||||
const [t] = useTranslation();
|
const [t] = useTranslation();
|
||||||
|
const Navigate = useNavigate();
|
||||||
|
const handleNavigate = () =>{
|
||||||
|
Navigate('/categories');
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div className="HeroSection">
|
<div className="HeroSection">
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -10,7 +15,7 @@ const HeroSection = () => {
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
{/* <h3> $229.50 </h3> */}
|
{/* <h3> $229.50 </h3> */}
|
||||||
<button className="button">{t("Buy Now")}</button>
|
<button className="button" onClick={handleNavigate}>{t("Buy Now")}</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<span>
|
<span>
|
||||||
|
|
|
||||||
|
|
@ -9,12 +9,12 @@ const HeaderLink = ({text,isMulti,extraText,extraLink}:THeaderLink) => {
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className='header_link'>
|
<div className='header_link'>
|
||||||
<Link to={"/"}>{t("Home")}</Link>
|
<Link to={"/"} className='first_link'>{t("Home")}</Link>
|
||||||
<FaChevronRight/>
|
<FaChevronRight/>
|
||||||
{
|
{
|
||||||
isMulti ?
|
isMulti ?
|
||||||
<>
|
<>
|
||||||
<Link to={`/${extraLink}`}>{ t(extraText || "")}</Link>
|
<Link to={`/${extraLink}`} className='first_link'>{ t(extraText || "")}</Link>
|
||||||
<FaChevronRight/>
|
<FaChevronRight/>
|
||||||
</>
|
</>
|
||||||
: ""
|
: ""
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,13 @@
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
letter-spacing: .7px;
|
letter-spacing: .7px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
.first_link{
|
||||||
|
transition: ease-in-out .1s;
|
||||||
|
&:hover{
|
||||||
|
color: var(--primary);
|
||||||
|
border-bottom: 2px solid var(--primary);
|
||||||
|
}
|
||||||
|
}
|
||||||
.page_title_link{
|
.page_title_link{
|
||||||
color: var(--primary);
|
color: var(--primary);
|
||||||
border-bottom: 2px solid var(--primary);
|
border-bottom: 2px solid var(--primary);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user