-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.jsx
38 lines (31 loc) · 913 Bytes
/
index.jsx
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
// Libraries
import React, { useState } from "react";
import Auth from "../../../../Auth";
import Logout from "../../../../Logout";
// Styles
import { Container, Highlight } from "../../../../styles/index.style";
import { Background, Tag } from "./header.style";
require("dotenv").config();
const Header = () => {
const [user, setUser] = useState(localStorage.user_id);
return (
<Background>
<Container>
<Tag>If This Then Donate</Tag>
<h1>
Engagement on social media <Highlight>does matter</Highlight>
</h1>
<p>
Make it matter more by automating your donations based on social media
hashtags and content.
</p>
{user ? (
<Logout removeUser={() => setUser(null)} />
) : (
<Auth addUser={(x) => setUser(x)} />
)}
</Container>
</Background>
);
};
export default Header;