File tree Expand file tree Collapse file tree 5 files changed +47
-18
lines changed Expand file tree Collapse file tree 5 files changed +47
-18
lines changed Original file line number Diff line number Diff line change 77 "@testing-library/jest-dom" : " ^4.2.4" ,
88 "@testing-library/react" : " ^9.4.0" ,
99 "@testing-library/user-event" : " ^7.2.1" ,
10- "axios" : " ^0.19.1 " ,
10+ "axios" : " ^0.19.2 " ,
1111 "highlight.js" : " ^9.17.1" ,
1212 "history" : " ^4.10.1" ,
1313 "html-to-markdown" : " ^1.0.0" ,
3737 "semantic-ui-react" : " ^0.88.2"
3838 },
3939 "scripts" : {
40- "start" : " react-scripts start" ,
40+ "start" : " HTTPS=true react-scripts start" ,
4141 "build" : " react-scripts build" ,
4242 "test" : " react-scripts test" ,
4343 "eject" : " react-scripts eject"
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ import BlogList from './pages/Blogs/BlogList'
1818// import Codebadge from './pages/Codebadge/Codebadge';
1919import NavBar from './components/NavBar'
2020import Footer from './components/Footer'
21- import TwitterFeeds from './components/TwitterFeeds/TwitterFeeds'
2221
2322// import Header from "./Header/header"
2423function App ( ) {
@@ -67,7 +66,6 @@ function App() {
6766
6867 </ Switch >
6968 </ BrowserRouter >
70- < TwitterFeeds />
7169 < Footer />
7270 </ div >
7371 </ >
Original file line number Diff line number Diff line change 1- import React from 'react' ;
2- import { TwitterTimelineEmbed } from 'react-twitter-embed' ;
3- const TwitterFeeds = ( ) => {
4- return (
5- < div class = "container" style = { { justfyContent :"space-evenly" } } >
6- < TwitterTimelineEmbed
7- sourceType = "profile"
8- screenName = "codeuino"
9- />
10- </ div >
11- ) ;
1+ import React , { Component } from 'react' ;
2+ import axios from "axios" ;
3+ export class TwitterFeeds extends Component {
4+ constructor ( props ) {
5+ super ( props ) ;
6+ this . state = {
7+ tweets :[ ]
8+ }
9+
10+ }
11+
12+ componentDidMount ( ) {
13+ axios . get ( "https://cors-anywhere.herokuapp.com/https://tweet-help.herokuapp.com/tweets" , { params :{ username :"codeuino" } } )
14+ . then ( res => {
15+ let tweets = res . data . tweets
16+ this . setState ( { 'tweets' :tweets } )
17+ } )
18+ . catch ( err => console . log ( err ) )
19+ }
20+ render ( ) {
21+ return (
22+ < div >
23+ < h2 > Latest Updates</ h2 >
24+ < div class = "container" >
25+ < div class = "row" style = { { justifyContent :"space-around" } } >
26+ {
27+ this . state . tweets . map ( ( content , index ) => {
28+ let url = "https://twitframe.com/show?url=https%3A%2F%2Ftwitter.com%2Fcodeuino%2Fstatus%2F" + content [ 5 ] ;
29+ console . log ( url )
30+ return < iframe border = "0" scrolling = "no" frameborder = "0" height = "300" src = { url } > </ iframe >
31+ }
32+ )
33+ }
34+ </ div >
35+ < br />
36+ < a href = "https://twitter.com/codeuino" class = "shadow lift mr-1" style = { { color :"#22247A" } } > < u > Read More on Twitter</ u > </ a >
37+ </ div >
38+ </ div >
39+ ) ;
40+ }
1241}
1342
1443export default TwitterFeeds ;
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import Projects from './Components/Projects'
55import LandingPageComponent from './Components/LandingPageComponent'
66import Activities from './Components/Activities'
77import Partners from './Components/Partners'
8+ import TweetFeeds from '../../components/TwitterFeeds/TwitterFeeds'
89const NewHome = ( ) => {
910 return (
1011 < div >
@@ -15,6 +16,7 @@ const NewHome = () => {
1516 < Projects />
1617 < Activities />
1718 < Partners />
19+ < TweetFeeds />
1820 < ScrollToTopBtn />
1921 </ div >
2022 </ div >
You can’t perform that action at this time.
0 commit comments