Skip to content

Tweets section updated #199

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.4.0",
"@testing-library/user-event": "^7.2.1",
"axios": "^0.19.1",
"axios": "^0.19.2",
"highlight.js": "^9.17.1",
"history": "^4.10.1",
"html-to-markdown": "^1.0.0",
Expand Down Expand Up @@ -37,7 +37,7 @@
"semantic-ui-react": "^0.88.2"
},
"scripts": {
"start": "react-scripts start",
"start": "HTTPS=true react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
Expand Down
2 changes: 0 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import BlogList from './pages/Blogs/BlogList'
// import Codebadge from './pages/Codebadge/Codebadge';
import NavBar from './components/NavBar'
import Footer from './components/Footer'
import TwitterFeeds from './components/TwitterFeeds/TwitterFeeds'

// import Header from "./Header/header"
function App() {
Expand Down Expand Up @@ -67,7 +66,6 @@ function App() {

</Switch>
</BrowserRouter>
<TwitterFeeds/>
<Footer/>
</div>
</>
Expand Down
51 changes: 40 additions & 11 deletions src/components/TwitterFeeds/TwitterFeeds.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,43 @@
import React from 'react';
import { TwitterTimelineEmbed } from 'react-twitter-embed';
const TwitterFeeds = () => {
return (
<div class="container" style={{justfyContent:"space-evenly"}}>
<TwitterTimelineEmbed
sourceType="profile"
screenName="codeuino"
/>
</div>
);
import React, { Component } from 'react';
import axios from "axios";
export class TwitterFeeds extends Component {
constructor(props){
super(props);
this.state={
tweets:[]
}

}

componentDidMount(){
axios.get("https://cors-anywhere.herokuapp.com/https://tweet-help.herokuapp.com/tweets",{params:{username:"codeuino"}})
.then(res=>{
let tweets = res.data.tweets
this.setState({'tweets':tweets})
})
.catch(err=>console.log(err))
}
render() {
return (
<div>
<h2>Latest Updates</h2>
<div class="container">
<div class="row" style={{justifyContent:"space-around"}}>
{
this.state.tweets.map((content,index)=>{
let url="https://twitframe.com/show?url=https%3A%2F%2Ftwitter.com%2Fcodeuino%2Fstatus%2F"+content[5];
console.log(url)
return <iframe border="0" scrolling="no" frameborder="0" height="300" src={url} ></iframe>
}
)
}
</div>
<br/>
<a href="https://twitter.com/codeuino" class="shadow lift mr-1" style={{color:"#22247A"}}><u>Read More on Twitter</u></a>
</div>
</div>
);
}
}

export default TwitterFeeds;
2 changes: 2 additions & 0 deletions src/pages/Home/NewHome.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import Projects from './Components/Projects'
import LandingPageComponent from './Components/LandingPageComponent'
import Activities from './Components/Activities'
import Partners from './Components/Partners'
import TweetFeeds from '../../components/TwitterFeeds/TwitterFeeds'
const NewHome = () => {
return (
<div>
Expand All @@ -15,6 +16,7 @@ const NewHome = () => {
<Projects/>
<Activities/>
<Partners/>
<TweetFeeds/>
<ScrollToTopBtn />
</div>
</div>
Expand Down