├── public ├── robots.txt ├── favicon.ico ├── logo192.png ├── logo512.png ├── manifest.json └── index.html ├── src ├── api.js ├── Wishlist.js ├── index.css ├── reportWebVitals.js ├── App.js ├── index.js ├── firebase.js ├── App.css ├── TimeLine.js ├── Header.js ├── StatsRow.js ├── Timeline.css ├── stock.svg ├── negStock.svg ├── stock2.svg ├── Stats.css ├── Header.css ├── Article.js ├── robinhood.svg ├── LineGraph.js ├── Newsfeed.js ├── Stats.js └── Newsfeed.css ├── .gitignore ├── package.json ├── README.md └── .eslintcache /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverProgrammers/robinhood-clone/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverProgrammers/robinhood-clone/HEAD/public/logo192.png -------------------------------------------------------------------------------- /public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CleverProgrammers/robinhood-clone/HEAD/public/logo512.png -------------------------------------------------------------------------------- /src/api.js: -------------------------------------------------------------------------------- 1 | import axios from "axios"; 2 | 3 | const key = "bv1uf4v48v6o5ed6h88g"; 4 | 5 | export { key }; 6 | -------------------------------------------------------------------------------- /src/Wishlist.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | 3 | function Wishlist({ stocks }) { 4 | return ( 5 |
6 | 7 |
8 | ) 9 | } 10 | 11 | export default Wishlist 12 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 4 | 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', 5 | sans-serif; 6 | -webkit-font-smoothing: antialiased; 7 | -moz-osx-font-smoothing: grayscale; 8 | } 9 | 10 | code { 11 | font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', 12 | monospace; 13 | } 14 | -------------------------------------------------------------------------------- /src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /src/App.js: -------------------------------------------------------------------------------- 1 | import "./App.css"; 2 | import Header from "./Header"; 3 | import NewsFeed from "./Newsfeed"; 4 | import Stats from "./Stats"; 5 | 6 | function App() { 7 | return ( 8 |
9 |
10 |
11 |
12 |
13 |
14 | 15 | 16 |
17 |
18 |
19 | ); 20 | } 21 | 22 | export default App; 23 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import reportWebVitals from './reportWebVitals'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | , 11 | document.getElementById('root') 12 | ); 13 | 14 | // If you want to start measuring performance in your app, pass a function 15 | // to log results (for example: reportWebVitals(console.log)) 16 | // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals 17 | reportWebVitals(); 18 | -------------------------------------------------------------------------------- /public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /src/firebase.js: -------------------------------------------------------------------------------- 1 | import firebase from "firebase"; 2 | 3 | const firebaseConfig = { 4 | apiKey: "AIzaSyCHd2NwLZajL2sRGCQj9Lor-U8h037uP68", 5 | authDomain: "robinhood-18491.firebaseapp.com", 6 | databaseURL: "https://robinhood-18491.firebaseio.com", 7 | projectId: "robinhood-18491", 8 | storageBucket: "robinhood-18491.appspot.com", 9 | messagingSenderId: "780218621678", 10 | appId: "1:780218621678:web:085fd8f2d36d56c33f9dff", 11 | measurementId: "G-EFJRF2GST1" 12 | }; 13 | 14 | const firebaseApp = firebase.initializeApp(firebaseConfig); 15 | 16 | const db = firebaseApp.firestore(); 17 | 18 | export { db }; -------------------------------------------------------------------------------- /src/App.css: -------------------------------------------------------------------------------- 1 | * { 2 | margin: 0; 3 | } 4 | 5 | body { 6 | background-color: black; 7 | } 8 | 9 | .app { 10 | background-color: black; 11 | /* height: fit-content; */ 12 | place-items: center; 13 | } 14 | 15 | .app__header { 16 | } 17 | 18 | .app__body { 19 | /* make background black later */ 20 | background-color: black; 21 | margin: 0; 22 | display: grid; 23 | place-items: center; 24 | z-index: -1; 25 | } 26 | 27 | .app__container { 28 | display: flex; 29 | background-color: black; 30 | padding-top: 36px; 31 | width: 1024px; 32 | box-shadow: -1px 4px 20px -6px rgba(0, 0, 0, 0.7); 33 | color: white; 34 | z-index: 50; 35 | } 36 | -------------------------------------------------------------------------------- /src/TimeLine.js: -------------------------------------------------------------------------------- 1 | import React from 'react' 2 | import "./Timeline.css"; 3 | 4 | function TimeLine() { 5 | return ( 6 |
7 |
8 |
LIVE
9 |
1D
10 |
1W
11 |
3M
12 |
1Y
13 |
ALL
14 |
15 |
16 | ) 17 | } 18 | 19 | export default TimeLine 20 | -------------------------------------------------------------------------------- /src/Header.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import SearchOutlined from "@material-ui/icons/SearchOutlined"; 3 | import "./Header.css"; 4 | import Logo from './robinhood.svg' 5 | 6 | function Header() { 7 | return ( 8 |
9 |
10 | 11 |
12 |
13 |
14 | 15 | 16 |
17 |
18 |
19 | Free Stocks 20 | PortFolio 21 | Cash 22 | Messages 23 | Account 24 |
25 |
26 | ); 27 | } 28 | 29 | export default Header; 30 | -------------------------------------------------------------------------------- /src/StatsRow.js: -------------------------------------------------------------------------------- 1 | import React from "react"; 2 | import StockChart from './stock.svg' 3 | 4 | function StatsRow(props) { 5 | // console.log(props, "what is in props here?"); 6 | // (currentPrice - openPrice)/openPrice 7 | const percentage = ((props.price - props.openPrice)/props.openPrice) * 100; 8 | 9 | const getModal = () => { 10 | 11 | } 12 | return ( 13 |
14 |
15 |

{props?.name}

16 |

{props.volume && 17 | (props.volume + " shares") 18 | }

19 |
20 |
21 | 22 |
23 |
24 |

{props.price}

25 |

+{Number(percentage).toFixed(2)}%

26 |
27 |
28 | ); 29 | } 30 | 31 | export default StatsRow; 32 | -------------------------------------------------------------------------------- /src/Timeline.css: -------------------------------------------------------------------------------- 1 | .timeline__container { 2 | display:flex; 3 | border-bottom: 1px solid #3b4754; 4 | } 5 | .timeline__wrapper { 6 | display:flex; 7 | align-items: center; 8 | padding-bottom: 0px; 9 | 10 | } 11 | 12 | .timeline__live { 13 | padding: 12px; 14 | font-weight: bold; 15 | font-size: 16px; 16 | } 17 | .timeline__buttons__container { 18 | font-size: 16px; 19 | display: flex; 20 | align-items: center; 21 | justify-content: space-evenly; 22 | padding-bottom: 0px; 23 | } 24 | .timeline__button { 25 | font-weight: bold; 26 | padding: 10px 10px 20px 10px; 27 | cursor: pointer; 28 | } 29 | 30 | .timeline__button:hover { 31 | color: #5AC53B; 32 | } 33 | 34 | .timeline__button.active { 35 | color: #5AC53B; 36 | } 37 | 38 | .timeline__button.active { 39 | border-bottom: 2px solid #5AC53B; 40 | } 41 | 42 | /* .timeline__button: hover { 43 | border-bottom: 2px solid green; 44 | } */ 45 | -------------------------------------------------------------------------------- /src/stock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 11 | 12 | 13 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/negStock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /src/stock2.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 10 | 11 | 12 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "robinhood-clone", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@material-ui/core": "^4.11.1", 7 | "@material-ui/icons": "^4.9.1", 8 | "@testing-library/jest-dom": "^5.11.4", 9 | "@testing-library/react": "^11.1.0", 10 | "@testing-library/user-event": "^12.1.10", 11 | "axios": "^0.21.0", 12 | "chart.js": "^2.9.4", 13 | "firebase": "^8.1.1", 14 | "react": "^17.0.1", 15 | "react-chartjs-2": "^2.11.1", 16 | "react-dom": "^17.0.1", 17 | "react-scripts": "4.0.1", 18 | "web-vitals": "^0.2.4" 19 | }, 20 | "scripts": { 21 | "start": "react-scripts start", 22 | "build": "react-scripts build", 23 | "test": "react-scripts test", 24 | "eject": "react-scripts eject" 25 | }, 26 | "eslintConfig": { 27 | "extends": [ 28 | "react-app", 29 | "react-app/jest" 30 | ] 31 | }, 32 | "browserslist": { 33 | "production": [ 34 | ">0.2%", 35 | "not dead", 36 | "not op_mini all" 37 | ], 38 | "development": [ 39 | "last 1 chrome version", 40 | "last 1 firefox version", 41 | "last 1 safari version" 42 | ] 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /src/Stats.css: -------------------------------------------------------------------------------- 1 | .stats { 2 | flex: 0.3; 3 | display: flex; 4 | flex-direction: column; 5 | padding: 0px 30px 30px 30px; 6 | 7 | } 8 | 9 | .stats__container { 10 | flex-direction: column; 11 | flex: 1; 12 | background-color: #1E2023; 13 | border-radius: 5px; 14 | border: 1px solid #42494D; 15 | } 16 | 17 | .stats__content { 18 | font-size: 13px; 19 | } 20 | 21 | .stats__header { 22 | display: flex; 23 | font-size: 16px; 24 | align-items: center; 25 | justify-content: space-between; 26 | border-bottom: 1px solid #42494D; 27 | padding: 20px 20px 10px 20px; 28 | font-weight: 500; 29 | } 30 | 31 | .stats-lists { 32 | height: 52px; 33 | border-top: 1px solid #42494D; 34 | padding: 4px 20px 0px 20px; 35 | } 36 | 37 | .row { 38 | display: flex; 39 | justify-content: space-between; 40 | height: 60px; 41 | padding: 0 24px; 42 | align-items: center; 43 | cursor: pointer; 44 | } 45 | 46 | .row:hover { 47 | background-color: #31363A; 48 | } 49 | 50 | .row__intro > h1 { 51 | font-size: 16px; 52 | font-weight: bold; 53 | padding-bottom: 2px; 54 | } 55 | 56 | .row__intro > p { 57 | font-size: 12px; 58 | } 59 | 60 | .row__numbers { 61 | text-align: end; 62 | font-weight: 500; 63 | } 64 | 65 | .row__price { 66 | padding-bottom: 4px; 67 | } 68 | 69 | .row__percentage { 70 | color: #5AC53B; 71 | } -------------------------------------------------------------------------------- /src/Header.css: -------------------------------------------------------------------------------- 1 | .header__wrapper { 2 | background-color: black; 3 | color: white; 4 | display: flex; 5 | justify-content: space-between; 6 | align-items: center; 7 | height: 64px; 8 | } 9 | 10 | .header__logo { 11 | margin-left: 48px; 12 | } 13 | 14 | .header__search { 15 | display: flex; 16 | align-items: center; 17 | background-color: black; 18 | height: 39px; 19 | padding: 10px; 20 | } 21 | 22 | .header__searchContainer { 23 | display: flex; 24 | align-items: center; 25 | width: 100%; 26 | height: 20px; 27 | border: 1px solid #31363A; 28 | padding: 5px; 29 | border-radius: 4px; 30 | } 31 | 32 | .header__searchContainer > .MuiSvgIcon-root { 33 | color: gray; 34 | padding: 10px; 35 | } 36 | 37 | .header__searchContainer > input { 38 | border: none; 39 | width: 375px; 40 | margin-left: 5px; 41 | margin-right: 10px; 42 | background-color: black; 43 | color: white; 44 | } 45 | 46 | .header__searchContainer > input:focus { 47 | outline: none; 48 | } 49 | 50 | .header__menuItems { 51 | margin-right: 48px; 52 | } 53 | 54 | .header__menuItems a { 55 | font-weight: bold; 56 | color: white; 57 | text-decoration: none; 58 | padding: 0 10px; 59 | } 60 | 61 | .header__menuItems a:hover, 62 | .header__menuItems a:active { 63 | color: #5AC53B; 64 | } 65 | 66 | a:first-of-type { 67 | color: #5AC53B; 68 | } 69 | -------------------------------------------------------------------------------- /src/Article.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from "react"; 2 | import MoreHorizIcon from "@material-ui/icons/MoreHoriz"; 3 | import FlashOnIcon from "@material-ui/icons/FlashOn"; 4 | import {key} from "./api"; 5 | import axios from "axios"; 6 | 7 | const BASE_URL = "https://finnhub.io/api/v1/news?category=general"; 8 | 9 | function Article(props) { 10 | const [article, setArticle] = useState({}); 11 | 12 | useEffect(() => { 13 | if (props) { 14 | return axios 15 | .get(BASE_URL) 16 | .then((res) => { 17 | console.log(res.data, 'res data'); 18 | let article = res.data[0]; 19 | setArticle(article); 20 | }) 21 | .catch((error) => { 22 | console.error("Error", error.message); 23 | }); 24 | } 25 | },[]); 26 | 27 | return ( 28 |
29 |
30 | 31 |
32 |

{article.headline}

33 |
34 | 35 |
36 |
37 |
38 |

39 | {article.summary} 40 |

41 |
42 |
43 | 44 |
45 |
46 |
47 | ); 48 | } 49 | export default Article; 50 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /src/robinhood.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 9 | 15 | 18 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/LineGraph.js: -------------------------------------------------------------------------------- 1 | import React, { useEffect, useState } from "react"; 2 | import { Line } from "react-chartjs-2"; 3 | 4 | const options = { 5 | legend: { 6 | display: false, 7 | }, 8 | hover: { 9 | intersect: false 10 | }, 11 | elements: { 12 | line: { 13 | tension: 0 14 | }, 15 | point: { 16 | radius: 0, 17 | }, 18 | }, 19 | maintainAspectRatio: false, 20 | tooltips: { 21 | mode: "index", 22 | intersect: false, 23 | callbacks: { 24 | }, 25 | }, 26 | scales: { 27 | xAxes: [ 28 | { 29 | type: "time", 30 | time: { 31 | format: "MM/DD/YY", 32 | tooltipFormat: "ll", 33 | }, 34 | ticks: { 35 | display: false, 36 | } 37 | }, 38 | ], 39 | yAxes: [ 40 | { 41 | gridLines: { 42 | display: false, 43 | }, 44 | ticks: { 45 | display: false, 46 | }, 47 | }, 48 | ], 49 | }, 50 | }; 51 | 52 | function LineGraph({ casesType }) { 53 | const [data, setData] = useState({}); 54 | 55 | useEffect(() => { 56 | 57 | let data = []; 58 | let value = 50; 59 | for(var i = 0; i < 366; i++){ 60 | let date = new Date(); 61 | date.setHours(0,0,0,0); 62 | date.setDate(i); 63 | value += Math.round((Math.random() < 0.5 ? 1 : 0) * Math.random() * 10); 64 | data.push({x: date, y: value}); 65 | } 66 | setData(data) 67 | }, []); 68 | 69 | return ( 70 |
71 | {data?.length > 0 && ( 72 | 92 | )} 93 |
94 | ); 95 | } 96 | 97 | export default LineGraph; 98 | -------------------------------------------------------------------------------- /src/Newsfeed.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from "react"; 2 | import "./Newsfeed.css"; 3 | import Article from "./Article"; 4 | import { Avatar } from "@material-ui/core"; 5 | import MoreHorizIcon from "@material-ui/icons/MoreHoriz"; 6 | import FlashOnIcon from "@material-ui/icons/FlashOn"; 7 | import LineGraph from "./LineGraph"; 8 | import Chip from '@material-ui/core/Chip'; 9 | import TimeLine from './TimeLine' 10 | 11 | 12 | function Newsfeed() { 13 | const [popularTopics, setTopics] = useState([ 14 | "Technology", 15 | "Top Movies", 16 | "Upcoming Earnings", 17 | "Crypto", 18 | "Cannabis", 19 | "Healthcare Supplies", 20 | "Index ETFs", 21 | "Technology", 22 | "China", 23 | "Pharma", 24 | ]); 25 | 26 | const [seed, setSeed] = useState(""); 27 | 28 | useEffect(() => { 29 | setSeed(Math.floor(Math.random() * 5000)); 30 | }, []); 31 | 32 | return ( 33 |
34 |
35 |
36 |
37 |

$114,656,84

38 |

$142.90 (-0,12) Today

39 |
40 |
41 | 42 | 43 |
44 |
45 |
46 |

Buying Power

47 |

$4.11

48 |
49 |
50 |
51 |

Markets Closed

52 |

Happy Thanksgiving

53 |
54 |
55 |
56 |
57 |

Popular lists

58 |

Show More

59 |
60 |
61 | {popularTopics.map((topic) => ( 62 | } 69 | /> 70 | ))} 71 |
72 |
73 |
74 |
75 | ); 76 | } 77 | 78 | export default Newsfeed; 79 | -------------------------------------------------------------------------------- /src/Stats.js: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect } from "react"; 2 | import "./Stats.css"; 3 | import MoreHorizIcon from "@material-ui/icons/MoreHoriz"; 4 | import StatsRow from "./StatsRow"; 5 | import { key } from "./api"; 6 | import axios from "axios"; 7 | import { db } from "./firebase"; 8 | 9 | const BASE_URL = "https://finnhub.io/api/v1/quote?symbol="; 10 | const KEY_URL = `&token=${key}`; 11 | 12 | 13 | const testData = []; 14 | 15 | function Stats() { 16 | const [stocksData, setStocksData] = useState([]); 17 | const [myStocks, setMyStocks] = useState([]); 18 | 19 | const getMyStocks = () => { 20 | db 21 | .collection('myStocks') 22 | .onSnapshot(snapshot => { 23 | let promises = []; 24 | let tempData = [] 25 | snapshot.docs.map((doc) => { 26 | promises.push(getStocksData(doc.data().ticker) 27 | .then(res => { 28 | tempData.push({ 29 | id: doc.id, 30 | data: doc.data(), 31 | info: res.data 32 | }) 33 | }) 34 | )}) 35 | Promise.all(promises).then(()=>{ 36 | setMyStocks(tempData); 37 | }) 38 | }) 39 | } 40 | 41 | const getStocksData = (stock) => { 42 | return axios 43 | .get(`${BASE_URL}${stock}${KEY_URL}`) 44 | .catch((error) => { 45 | console.error("Error", error.message); 46 | }); 47 | }; 48 | 49 | useEffect(() => { 50 | const stocksList = ["AAPL", "MSFT", "TSLA", "FB", "BABA", "UBER", "DIS", "SBUX"]; 51 | 52 | getMyStocks(); 53 | let promises = []; 54 | stocksList.map((stock) => { 55 | promises.push( 56 | getStocksData(stock) 57 | .then((res) => { 58 | testData.push({ 59 | name: stock, 60 | ...res.data 61 | }); 62 | }) 63 | ) 64 | }); 65 | 66 | Promise.all(promises).then(()=>{ 67 | console.log(testData); 68 | setStocksData(testData); 69 | }) 70 | }, []); 71 | 72 | return ( 73 |
74 |
75 |
76 |

Stocks

77 | 78 |
79 |
80 |
81 | {myStocks.map((stock) => ( 82 | 89 | ))} 90 |
91 |
92 |
93 |

Lists

94 |
95 |
96 |
97 | {stocksData.map((stock) => ( 98 | 104 | ))} 105 |
106 |
107 |
108 |
109 | ); 110 | } 111 | 112 | export default Stats; -------------------------------------------------------------------------------- /src/Newsfeed.css: -------------------------------------------------------------------------------- 1 | .newsfeed { 2 | flex: 0.7; 3 | display: flex; 4 | flex-direction: column; 5 | background-color: black; 6 | } 7 | 8 | .newsfeed__container { 9 | flex: 1; 10 | background-color: black; 11 | font-size: 12px; 12 | } 13 | 14 | .newsfeed__chart__section { 15 | } 16 | .newsfeed__buying__section { 17 | padding: 20px 0px 20px 0px; 18 | display: flex; 19 | justify-content: space-between; 20 | border-bottom: 1px solid #3b4754; 21 | margin-bottom: 60px; 22 | } 23 | 24 | .newsfeed__market__section { 25 | margin: 12px 0; 26 | padding: 0; 27 | margin-bottom: 60px; 28 | } 29 | 30 | .newsfeed__market__box { 31 | height: 10vh; 32 | padding: 20px; 33 | border-radius: 4px; 34 | border: 1px solid #31363A; 35 | } 36 | 37 | .newsfeed__market__box p { 38 | color: #7B858A; 39 | font-size: 15px; 40 | text-transform: uppercase; 41 | font-weight: 700; 42 | margin-bottom: 8px; 43 | } 44 | 45 | .newsfeed__popularlists__section { 46 | height: fit-content; 47 | padding-bottom: 20px; 48 | } 49 | 50 | .newsfeed__popularlists__intro { 51 | display: flex; 52 | justify-content: space-between; 53 | align-items: center; 54 | padding: 20px 0px 20px 0px; 55 | } 56 | 57 | .newsfeed__popularlists__intro > p { 58 | font-weight: bold; 59 | color: orange; 60 | } 61 | 62 | .newsfeed_popularlists_badges { 63 | display: flex; 64 | flex-wrap: wrap; 65 | } 66 | 67 | .newsfeed_popularlists_badges .topic__badge { 68 | border: 1px solid #31363A; 69 | background-color: transparent; 70 | color: white; 71 | margin-right: 8px; 72 | margin-bottom: 8px; 73 | } 74 | 75 | .newsfeed__articles__section { 76 | background-color: black; 77 | } 78 | 79 | .newsfeed__articles__header { 80 | padding: 20px 0px 10px 0px; 81 | border-bottom: 1px solid #3b4754; 82 | } 83 | .newsfeed__articles { 84 | flex-direction: column; 85 | } 86 | .newsfeed__article__title { 87 | display: flex; 88 | align-items: center; 89 | padding: 20px 0px 10px 0px; 90 | } 91 | 92 | .newsfeed__article__source { 93 | font-weight: bold; 94 | flex: 1; 95 | } 96 | 97 | .newsfeed__article__content { 98 | display: flex; 99 | align-items: top; 100 | justify-content: space-between; 101 | padding-right: 30px; 102 | padding-bottom: 20px; 103 | border-bottom: 1px solid #3b4754; 104 | } 105 | 106 | .newsfeed__topmovers__section { 107 | padding: 20px 0px 10px 0px; 108 | background-color: black; 109 | height: fit-content; 110 | } 111 | .newsfeed__topmovers__intro__details { 112 | display: flex; 113 | justify-content: space-between; 114 | color: darkgrey; 115 | } 116 | 117 | .newsfeed__topmovers__intro__details p:nth-child(2) { 118 | font-weight: bold; 119 | color: orange; 120 | } 121 | 122 | .newsfeed__topmovers__cards__container { 123 | background-color: black; 124 | justify-content: space-evenly; 125 | padding: 20px 20px 20px 0px; 126 | display: flex; 127 | } 128 | 129 | .newsfeed__topmovers__card { 130 | background-color: black; 131 | color: white; 132 | padding: 20px 20px 20px 20px; 133 | margin-left: 12px; 134 | width: 90px; 135 | height: 120px; 136 | border: 1px solid lightgray; 137 | border-radius: 5px; 138 | display: flex; 139 | flex-direction: column; 140 | justify-content: space-between; 141 | } 142 | 143 | .newsfeed__topmovers__card__name { 144 | } 145 | 146 | .newsfeed__topmovers__card__numbers { 147 | color: #66ff00; 148 | } 149 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `yarn start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in the browser. 13 | 14 | The page will reload if you make edits.\ 15 | You will also see any lint errors in the console. 16 | 17 | ### `yarn test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `yarn build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `yarn eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can’t go back!** 35 | 36 | If you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own. 39 | 40 | You don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `yarn build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /.eslintcache: -------------------------------------------------------------------------------- 1 | [{"/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/Newsfeed.js":"1","/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/Header.js":"2","/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/StatsRow.js":"3","/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/LineGraph.js":"4","/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/TimeLine.js":"5","/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/Stats.js":"6","/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/api.js":"7","/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/Article.js":"8"},{"size":2180,"mtime":1606674419153,"results":"9","hashOfConfig":"10"},{"size":766,"mtime":1606599282714,"results":"11","hashOfConfig":"10"},{"size":827,"mtime":1606676345715,"results":"12","hashOfConfig":"10"},{"size":1900,"mtime":1606618674966,"results":"13","hashOfConfig":"10"},{"size":703,"mtime":1606609382355,"results":"14","hashOfConfig":"10"},{"size":2777,"mtime":1606676809367,"results":"15","hashOfConfig":"10"},{"size":81,"mtime":1606674340375,"results":"16","hashOfConfig":"10"},{"size":1493,"mtime":1606674256298,"results":"17","hashOfConfig":"10"},{"filePath":"18","messages":"19","errorCount":0,"warningCount":5,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"134qyk8",{"filePath":"20","messages":"21","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"22","messages":"23","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"30","messages":"31","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"32","messages":"33","errorCount":0,"warningCount":3,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},"/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/Newsfeed.js",["34","35","36","37","38"],"/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/Header.js",["39"],"/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/StatsRow.js",["40"],"/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/LineGraph.js",[],"/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/TimeLine.js",[],"/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/Stats.js",["41","42","43"],"/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/api.js",["44"],"/Users/nazariydumanskyy/Projects/live-calls/robinhood-clone/src/Article.js",["45","46","47"],{"ruleId":"48","severity":1,"message":"49","line":3,"column":8,"nodeType":"50","messageId":"51","endLine":3,"endColumn":15},{"ruleId":"48","severity":1,"message":"52","line":5,"column":8,"nodeType":"50","messageId":"51","endLine":5,"endColumn":21},{"ruleId":"48","severity":1,"message":"53","line":6,"column":8,"nodeType":"50","messageId":"51","endLine":6,"endColumn":19},{"ruleId":"48","severity":1,"message":"54","line":13,"column":25,"nodeType":"50","messageId":"51","endLine":13,"endColumn":34},{"ruleId":"48","severity":1,"message":"55","line":26,"column":10,"nodeType":"50","messageId":"51","endLine":26,"endColumn":14},{"ruleId":"56","severity":1,"message":"57","line":10,"column":9,"nodeType":"58","endLine":10,"endColumn":37},{"ruleId":"56","severity":1,"message":"57","line":21,"column":9,"nodeType":"58","endLine":21,"endColumn":44},{"ruleId":"59","severity":1,"message":"60","line":25,"column":33,"nodeType":"61","messageId":"62","endLine":25,"endColumn":35},{"ruleId":"59","severity":1,"message":"60","line":54,"column":28,"nodeType":"61","messageId":"62","endLine":54,"endColumn":30},{"ruleId":"63","severity":1,"message":"64","line":70,"column":6,"nodeType":"65","endLine":70,"endColumn":8,"suggestions":"66"},{"ruleId":"48","severity":1,"message":"67","line":1,"column":8,"nodeType":"50","messageId":"51","endLine":1,"endColumn":13},{"ruleId":"48","severity":1,"message":"68","line":4,"column":9,"nodeType":"50","messageId":"51","endLine":4,"endColumn":12},{"ruleId":"63","severity":1,"message":"69","line":25,"column":11,"nodeType":"65","endLine":25,"endColumn":13,"suggestions":"70"},{"ruleId":"56","severity":1,"message":"57","line":43,"column":17,"nodeType":"58","endLine":43,"endColumn":67},"no-unused-vars","'Article' is defined but never used.","Identifier","unusedVar","'MoreHorizIcon' is defined but never used.","'FlashOnIcon' is defined but never used.","'setTopics' is assigned a value but never used.","'seed' is assigned a value but never used.","jsx-a11y/alt-text","img elements must have an alt prop, either with meaningful text, or an empty string for decorative images.","JSXOpeningElement","array-callback-return","Array.prototype.map() expects a return value from arrow function.","ArrowFunctionExpression","expectedInside","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'getMyStocks'. Either include it or remove the dependency array.","ArrayExpression",["71"],"'axios' is defined but never used.","'key' is defined but never used.","React Hook useEffect has a missing dependency: 'props'. Either include it or remove the dependency array.",["72"],{"desc":"73","fix":"74"},{"desc":"75","fix":"76"},"Update the dependencies array to be: [getMyStocks]",{"range":"77","text":"78"},"Update the dependencies array to be: [props]",{"range":"79","text":"80"},[1683,1685],"[getMyStocks]",[781,783],"[props]"] --------------------------------------------------------------------------------