Skip to content
Open
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
61 changes: 22 additions & 39 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,55 +1,38 @@
import React from "react";
import "./App.css";
// import Projects from "./components/Projects/Projects";
import Jobs from "./components/Jobs/Jobs";
import Header from "./components/Header/Header";
import Contact from "./components/Contact/Contact";
// import Resume from "./components/CV/Resume";
import GithubStats from "./components/Github/GithubStats";
import ThemeSwitch from "./components/ThemeSwitch/ThemeSwitch";


class App extends React.Component {
constructor(props) {
super(props)

this.state = {
theme:"dark",
}
}
onChangeTheme=()=>{
const {theme}=this.state;
if(theme==="dark"){
this.setState({theme:"light"});
}
else{
this.setState({theme:"dark"});
NewYear:false,
time:"00h:00m:00s"
}
}
printConsoleData=()=>{
console.log("%cHi There\nI am Chilukuri Sri Harsha", "color:blue; font-size: 16pt");
console.log("%cYou are here probably because you know some code\nWant to discuss anything with me? Contact me at sharshach@gmail.com", "color:green; font-size: 12pt");

}
componentDidMount(){
this.printConsoleData();
}


updTime=()=>{
var date=new Date();
var min=60-date.getMinutes()-1;
var sec=60-date.getSeconds();
this.setState({time: min+"M:"+sec+"S",newYear:date.getYear()===2022});
}

componentDidMount() {
this.interval = setInterval(this.updTime, 1000);
}
componentWillUnmount() {
clearInterval(this.interval);
}
render() {
const{theme}=this.state;
return (
<div className="App">
<Header theme={theme}/>
<div className="left-block">
<div id="jobs"><Jobs theme={theme}/></div>
<div id="github"><GithubStats theme={theme}/></div>
{/* <div className="app-projects">
<Projects />
</div> */}
{/* <Resume /> */}
</div>
<div className="right-block">
<Contact />
</div>
<ThemeSwitch theme={this.state.theme} onChangeTheme={this.onChangeTheme}/>
{
"Happy New Year 2022"
}

</div>
)
}
Expand Down