diff --git a/src/Components/Hero/Hero.css b/src/Components/Hero/Hero.css index c4ec4b7..be041aa 100644 --- a/src/Components/Hero/Hero.css +++ b/src/Components/Hero/Hero.css @@ -61,8 +61,15 @@ color: white; font-size: 22px; font-weight: 500; + cursor: pointer; } +.hero-latest-btn:hover +{ + background: #d30202; + color: white; + border: 2px solid #ff4141; +} .hero-right{ flex:1; display: flex; diff --git a/src/Components/Hero/Hero.jsx b/src/Components/Hero/Hero.jsx index 8a59f7a..ee47876 100644 --- a/src/Components/Hero/Hero.jsx +++ b/src/Components/Hero/Hero.jsx @@ -1,26 +1,27 @@ -import React, { useContext } from 'react' -import './Hero.css' -import hand_icon from '../Assets/hand_icon.png' -import arrow_icon from '../Assets/arrow.png' -import hero_image from '../Assets/hero_image.png' -import { ShopContext } from '../../Context/ShopContext' +// Hero.jsx +import React, { useContext } from 'react'; +import './Hero.css'; +import hand_icon from '../Assets/hand_icon.png'; +import arrow_icon from '../Assets/arrow.png'; +import hero_image from '../Assets/hero_image.png'; +import { ShopContext } from '../../Context/ShopContext'; -const Hero = () => { - const {theme}=useContext(ShopContext) +const Hero = ({ scrollToNewCollections }) => { + const { theme } = useContext(ShopContext); return ( -
+
-

NEW ARRIVALS ONLY

+

NEW ARRIVALS ONLY

-

New

+

New

-

Collections

-

For Everyone

+

Collections

+

For Everyone

-
-
Latest Collection
+
+
Latest Collection
@@ -28,7 +29,7 @@ const Hero = () => {
- ) -} + ); +}; -export default Hero +export default Hero; diff --git a/src/Components/NewCollections/NewCollections.jsx b/src/Components/NewCollections/NewCollections.jsx index 33ed9af..2de4db0 100644 --- a/src/Components/NewCollections/NewCollections.jsx +++ b/src/Components/NewCollections/NewCollections.jsx @@ -1,3 +1,4 @@ +//Newcollections.jsx import React, { useContext } from 'react' import './NewCollections.css' import new_collection from '../Assets/new_collections' diff --git a/src/Pages/Shop.jsx b/src/Pages/Shop.jsx index f9c6869..40a0487 100644 --- a/src/Pages/Shop.jsx +++ b/src/Pages/Shop.jsx @@ -1,21 +1,33 @@ -import React from 'react' -import Hero from '../Components/Hero/Hero' -import Popular from '../Components/Popular/Popular' -import Offers from '../Components/Offers/Offers' -import NewCollections from '../Components/NewCollections/NewCollections' -import NewsLetter from '../Components/NewsLetter/NewsLetter' -import Footer from '../Components/Footer/Footer' +// Shop.jsx +import React, { useRef } from 'react'; +import Hero from '../Components/Hero/Hero'; +import Popular from '../Components/Popular/Popular'; +import Offers from '../Components/Offers/Offers'; +import NewCollections from '../Components/NewCollections/NewCollections'; +import NewsLetter from '../Components/NewsLetter/NewsLetter'; +import Footer from '../Components/Footer/Footer'; const Shop = () => { + const newCollectionsRef = useRef(null); + + const scrollToNewCollections = () => { + if (newCollectionsRef.current) { + newCollectionsRef.current.scrollIntoView({ behavior: 'smooth' }); + } + }; + return (
- - - - - + + + +
+ +
+ +
- ) -} + ); +}; -export default Shop +export default Shop;