Skip to content

Commit

Permalink
Merge pull request #190 from arunimaChintu/patch-4
Browse files Browse the repository at this point in the history
Add a search bar- home.jsx
  • Loading branch information
Trisha-tech authored Jun 26, 2024
2 parents 3318702 + f618482 commit a654915
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client/src/Pages/Home.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React, { useState, useEffect } from 'react';
import B1Child from '../assets/image/B1Child.jpeg';
import AuthorImage from '../assets/image/author1.jpeg'
import Spinner from './Spinner';
import SearchBar from './SearchBar'; // Import the SearchBar component

const Home = () => {
const [isLoading, setIsLoading] = useState(true);
Expand All @@ -21,11 +22,19 @@ const Home = () => {
}, 2000);
}, []);

const handleSearch = (query) => {
console.log('Search query:', query);
// Implement search logic here
};

return (
<div className="bg-gray-100">
{isLoading && <Spinner />}
{!isLoading && (
<>
{/* Search Bar */}
<SearchBar onSearch={handleSearch} />

{/* Image Container */}
<header className="bg-white shadow">
<div className="container mx-auto p-6">
Expand Down

0 comments on commit a654915

Please sign in to comment.