diff --git a/src/components/Header/Header.tsx b/src/components/Header/Header.tsx index b010f02..225c2dc 100644 --- a/src/components/Header/Header.tsx +++ b/src/components/Header/Header.tsx @@ -1,9 +1,15 @@ -import React from "react"; +import { useState, ChangeEvent } from "react"; import Logo from "../../assets/icons/logo.svg"; import Button from "../shared/Button"; import { lowerMenuItems } from "../../utils/data"; const Header = () => { + const [searchValue, setSearchValue] = useState(""); + + const handleSearchChange = (e: ChangeEvent) => { + setSearchValue(e.target.value); + }; + return (
@@ -28,7 +34,7 @@ const Header = () => {
  • - +
    • @@ -49,7 +55,13 @@ const Header = () => { export default Header; -const SearchInput = ({ value, onChange }) => { +const SearchInput = ({ + value, + onChange, +}: { + value: string; + onChange: (e: ChangeEvent) => void; +}) => { return (
      { + return ( +
      + Hero +
      + ) +} + +export default Hero diff --git a/src/components/Hero/index.ts b/src/components/Hero/index.ts new file mode 100644 index 0000000..ef594a6 --- /dev/null +++ b/src/components/Hero/index.ts @@ -0,0 +1,3 @@ +import Hero from "./Hero"; + +export { Hero }; diff --git a/src/components/shared/Button.tsx b/src/components/shared/Button.tsx index 685d305..54de6f9 100644 --- a/src/components/shared/Button.tsx +++ b/src/components/shared/Button.tsx @@ -1,4 +1,3 @@ -import React from "react"; type ButtonProps = { className?: string; diff --git a/src/pages/HomePage.tsx b/src/pages/HomePage.tsx index 6a28b56..160387a 100644 --- a/src/pages/HomePage.tsx +++ b/src/pages/HomePage.tsx @@ -1,4 +1,3 @@ -import React from 'react' import { Header, TopHeader } from '../components/Header' const HomePage = () => { diff --git a/src/router/Router.tsx b/src/router/Router.tsx index cc485c2..e05442a 100644 --- a/src/router/Router.tsx +++ b/src/router/Router.tsx @@ -5,7 +5,7 @@ import { HomePage } from "../pages"; const Routers = () => { return ( - } /> + } /> ); };