Skip to content

Commit 2de3b5f

Browse files
author
Saulo Benigno
committed
adicionado pinterest e melhorias visuais
1 parent a202682 commit 2de3b5f

File tree

6 files changed

+36
-17
lines changed

6 files changed

+36
-17
lines changed

.idea/workspace.xml

+3-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/images/pinterest.png

1.96 KB
Loading

src/components/Form.jsx

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
import React from 'react'
2-
// import logoFbk from 'public/images/facebook.png'
3-
// import logoTwt from 'public/images/twitter.png'
4-
// import logoGlg from 'public/images/google.jpg'
52

63
export default class Form extends React.Component {
74

@@ -44,16 +41,19 @@ export default class Form extends React.Component {
4441
<div>
4542
<div>
4643
<button className="btn btn-logo" onClick={() => callSymbol('FBOK34')}>
47-
<img src='./images/facebook.png' alt="facebook logo" />
44+
<img src='./images/facebook.png' alt="Facebook logo" title="Facebook Inc. (FBOK34)" />
4845
</button>
4946
<button className="btn btn-logo" onClick={() => callSymbol('GOGL34')}>
50-
<img src='./images/google.png' alt="google logo" />
47+
<img src='./images/google.png' alt="Google logo" title="Alphabet Inc. (GOGL34)" />
48+
</button>
49+
<button className="btn btn-logo" onClick={() => callSymbol('P2IN34')}>
50+
<img src='./images/pinterest.png' alt="Pinterest logo" title="Pinterest, Inc. (P2IN34)" />
5151
</button>
5252
<button className="btn btn-logo" onClick={() => callSymbol('TWTR34')}>
53-
<img src='./images/twitter.png' alt="twitter logo" />
53+
<img src='./images/twitter.png' alt="Twitter logo" title="Twitter, Inc. (TWTR34)" />
5454
</button>
5555
</div>
56-
<div>
56+
<div className="algo" id="algo">
5757
<button className="btn btn-white" onClick={() => callAlgo('all')}>
5858
All
5959
</button>
@@ -67,7 +67,7 @@ export default class Form extends React.Component {
6767
Sell
6868
</button>
6969
</div>
70-
<div>
70+
<div className="days" id="days">
7171
Days:
7272
<select name="time_window" defaultValue={'10'} onChange={(event) => this.callDays(event)} >
7373
<option value="5">5</option>

src/components/Header.jsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default class Header extends React.Component {
55
render() {
66
return (
77
<div>
8-
Social Media - Stock Market
8+
<h3>Social Media - Stock Market</h3>
99
</div>
1010
)
1111
}

src/components/Table.jsx

+8-7
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ export default class Table extends React.Component {
1919

2020
render() {
2121

22-
console.log('days: ' + this.props.days);
23-
2422
let social_media = [];
2523
let social_type;
2624
let prices = [];
@@ -35,6 +33,9 @@ export default class Table extends React.Component {
3533
} else if (this.props.symbol === 'TWTR34') {
3634
social_media = 'Twitter, Inc.';
3735
social_type = 'Twitter';
36+
} else if (this.props.symbol === 'P2IN34') {
37+
social_media = 'Pinterest, Inc.';
38+
social_type = 'Pinterest';
3839
}
3940

4041
function randomDate(start, end) {
@@ -51,8 +52,6 @@ export default class Table extends React.Component {
5152
let number1 = Math.round(Math.random() * (this.props.days - 1) + 1);
5253
let number2 = number1 + parseInt(this.props.days);
5354

54-
console.log('n1: ' + number1 + ' , n2: ' + number2);
55-
5655
const { dates } = this.state
5756

5857
const stockPriceGenerator = (symbol, date) => {
@@ -82,6 +81,8 @@ export default class Table extends React.Component {
8281
if (this.props.symbol !== "") {
8382

8483
fetchData(this.props.symbol, social_type);
84+
document.getElementById("algo").style.visibility = 'visible';
85+
document.getElementById("days").style.visibility = 'visible';
8586

8687
return (
8788
<div>
@@ -130,9 +131,9 @@ export default class Table extends React.Component {
130131

131132
} else {
132133
return (
133-
<div>
134-
Choose the Social Media
135-
</div>
134+
<h4>
135+
choose your preferred social media network
136+
</h4>
136137
)
137138
}
138139

src/index.css

+16
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ body {
99
font-size: 30px;
1010
}
1111

12+
h3 {
13+
margin: 0;
14+
text-transform: uppercase;
15+
}
16+
1217
div {
1318
margin-top: 5px;
1419
}
@@ -91,4 +96,15 @@ select {
9196

9297
.index {
9398
color: darkgray;
99+
}
100+
101+
.days {
102+
text-align: right;
103+
margin-right: 10%;
104+
margin-top: -20px;
105+
visibility: hidden;
106+
}
107+
108+
.algo {
109+
visibility: hidden;
94110
}

0 commit comments

Comments
 (0)