@@ -5,17 +5,16 @@ import Navbar from "./components/Navbar";
5
5
import Card from "./components/Card" ;
6
6
import Footer from "./components/Footer" ;
7
7
import GenerateStats from "./components/GenerateStats" ;
8
- import { use , useContext , useEffect , useState } from "react" ;
8
+ import { useContext , useEffect , useState } from "react" ;
9
9
import PromotionCard from "./components/PromotionCard" ;
10
10
import { DataContext } from "./context/DataContext" ;
11
11
import { ToastContainer } from "react-toastify" ;
12
12
import "react-toastify/dist/ReactToastify.css" ;
13
13
import Skeleton from "./components/Skeleton" ;
14
14
15
15
export default function Home ( ) {
16
- const { datas, setDatas } = useContext ( DataContext ) ;
16
+ const { datas, setDatas, search , setSearch } = useContext ( DataContext ) ;
17
17
const [ loading , setLoading ] = useState ( true ) ;
18
- const [ search , setSearch ] = useState < string > ( "" ) ;
19
18
const [ showStats , setShowStats ] = useState ( false ) ;
20
19
const [ sortBy , setSortBy ] = useState ( "default" ) ;
21
20
@@ -75,7 +74,7 @@ export default function Home() {
75
74
/>
76
75
</ button >
77
76
78
- < Navbar search = { search } setSearch = { setSearch } />
77
+ < Navbar search = { search } setSearch = { setSearch } searchBarPresent = { true } />
79
78
80
79
< GenerateStats showStats = { showStats } setShowStats = { setShowStats } />
81
80
0 commit comments