diff options
-rw-r--r-- | src/components/Home.js | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/src/components/Home.js b/src/components/Home.js index c0e2b24..1bc54d2 100644 --- a/src/components/Home.js +++ b/src/components/Home.js @@ -4,26 +4,38 @@ import { benefitOne, benefitTwo } from "./Data"; import Benefits from "../components/Benefits"; import Cta from "../components/Cta"; import Faq from "../components/Faq"; +import {AuthContext} from "../providers/AuthContext"; +import React, {useContext} from "react"; +import Sidebar from "./Sidebar"; const Home = () => { + const {user} = useContext(AuthContext); + return ( <> - <Hero /> - <SectionTitle - pretitle="How It Works" - title="Getting Started with Helping Hands" - > - Helping Hands simplifies the process of finding or offering volunteer opportunities. Here's a step-by-step guide: - </SectionTitle> - <Benefits data={benefitOne} /> - <Benefits imgPos="right" data={benefitTwo} /> - <SectionTitle pretitle="FAQ" title="Frequently Asked Questions"> - Welcome to our FAQ section! Browse through common questions for quick answers. Your clarity and support matter to us. For any unanswered queries, reach out to our support team. - </SectionTitle> - <Faq /> - <Cta /> + {!user ? ( + <> + <Hero/> + <SectionTitle + pretitle="How It Works" + title="Getting Started with Helping Hands" + > + Helping Hands simplifies the process of finding or offering volunteer opportunities. Here's a + step-by-step guide: + </SectionTitle> + <Benefits data={benefitOne}/> + <Benefits imgPos="right" data={benefitTwo}/> + <SectionTitle pretitle="FAQ" title="Frequently Asked Questions"> + Welcome to our FAQ section! Browse through common questions for quick answers. Your clarity and + support matter to us. For any unanswered queries, reach out to our support team. + </SectionTitle> + <Faq/> + <Cta/> + </> + ) : ( + <Sidebar/> + )} </> ); } - -export default Home;
\ No newline at end of file + export default Home;
\ No newline at end of file |