-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAbout.js
70 lines (55 loc) · 2.2 KB
/
About.js
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import logo from '../logo.svg';
import Button from '../components/Button'
import './About.css';
import {Link} from 'react-router-dom'
import { useMoralis } from "react-moralis";
// this is a handler for the about page
const About = () => {
// The useMoralis hook provides all the basics functionalities that is needed for authentication and user data.
const { authenticate, isAuthenticated, logout, user } = useMoralis();
return(
<div className='about-page-container'>
<div className='header display-inline'>
{/* {check if user is already connected} */}
{isAuthenticated ?
// if true show:
<>
<>
<div className='back-btn'>
<Link to= '/'> <Button text={'Back'}/> </Link>
</div>
</>
<>
<small>{user.get("ethAddress")}</small>
<Button text={'Logout'} onClick ={logout}/>
</>
</>
:
// if false show:
<>
<Link to= '/'> <Button text={'Back'}/> </Link>
<Button text={'Connect Wallet'} onClick ={() => authenticate({ provider: "metamask" })}/>
</>
}
</div>
<div className='about-body-container'>
<div className='left-about'>
<img src={logo} className="App-logo-small" alt="logo" />
</div>
<div className='right-about'>
<h1>Final Year Project</h1>
<h5>Check out the documentation on Twitter
<a href="https://twitter.com/Adey_OF/status/1503335964067909632?ref_src=twsrc%5Etfw" target="_blank" > (@Adey_OF) March 14, 2022</a>
</h5>
<small>
This project is a web application that examines several challenges in the
supply chain process and a defined solution to address the resulting challenges.
The supply chain industry is one currently undergoing tension with bottlenecks,
the centralisation of supply chain records could be a major player with this chanllenge.
To solve this problem this project attempts to implement a platform that aids supply chain visibility by creating a decentralised supply chain tracker</small>
</div>
</div>
</div>
);
}
export default About