aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/Home.js
blob: 901b31d0989da766420a93c009404a8ab98efff0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import Hero from "../components/Hero";
import SectionTitle from "../components/SectionTitle";
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 (
        <>
            {!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;