Skip to content

Commit 01e6739

Browse files
Manually merge Isamu's codes
1 parent 1fcf420 commit 01e6739

2 files changed

Lines changed: 52 additions & 1 deletion

File tree

0 Bytes
Binary file not shown.

uoft-contribution-frontend/src/components/Home.js

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,61 @@
11
import React, {Component} from 'react';
2+
import ps5 from '../PS5.jpg'
3+
import xbox from '../XBOX.jpg'
4+
5+
import {Container, Row, Col, Alert, Image} from "react-bootstrap";
6+
27

38
class Home extends Component {
9+
handlexbox = event => {
10+
window.localStorage.setItem('console', 'xbox');
11+
//alert(window.localStorage.getItem('console'));
12+
};
13+
14+
handleps5 = event => {
15+
window.localStorage.setItem('console', 'PS5');
16+
//alert(window.localStorage.getItem('console'));
17+
};
18+
419
render() {
20+
function handlePS5 (e){
21+
//window.localStorage.setItem('console', 'PS5');
22+
console.log('hey');
23+
//console.log(window.localStorage.key('console'));
24+
}
25+
26+
function handleXbox(e) {
27+
28+
}
29+
30+
const imageClick = () => {
31+
console.log('Click');
32+
}
33+
534
return (
635
<div>
7-
Home Page......
36+
<Alert variant="warning">
37+
<Alert.Heading>Hello Gamer!</Alert.Heading>
38+
<p>
39+
Welcome to WebSiteBot where you can buy a PS5 or Xbox X. Just click on either a
40+
PS5 or Xbox below and get forwarded to the available suppliers!
41+
</p>
42+
<hr />
43+
<p className="mb-0">
44+
This project is being maintained by Alex Kocab
45+
</p>
46+
</Alert>
47+
48+
<br />
49+
50+
<Container>
51+
<a href = '/suppliers'><Image onClick={this.handleps5} src={ps5} width="500" rounded/></a>
52+
{' '}
53+
<a href = '/suppliers'><Image onClick={this.handlexbox} src={xbox} width="500" rounded/></a>
54+
55+
</Container>
56+
57+
58+
859
</div>
960
);
1061
}

0 commit comments

Comments
 (0)