Github profile finder

Size
2,514 Kb
Views
22,264

How do I make an github profile finder?

What is a github profile finder? How do you make a github profile finder? This script and codes were developed by Tushar Mehrotra on 22 September 2022, Thursday.

Github profile finder Previews

Github profile finder - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Github profile finder</title> <link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/css/bootstrap.min.css'>
</head>
<body> <h2 class="text-center">Search Github User</h2> <script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/react/15.3.1/react-dom.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.0/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

Github profile finder - Script Codes JS Codes

"use strict";
function getData(user) { return $.ajax({ type: "GET", data: "JSON", url: "https://api.github.com/users/" + user }).then(function (data) { return data; });
};
var SearchComponent = React.createClass({ displayName: "SearchComponent", onFormSubmit: function onFormSubmit(e) { e.preventDefault(); var user = this.refs.user.value; if (user.length > 0) { this.props.onSearch(user); } }, render: function render() { return React.createElement( "form", { onSubmit: this.onFormSubmit }, React.createElement("input", { type: "text", ref: "user" }), React.createElement( "button", null, "submit" ) ); }
});
var ListComponent = React.createClass({ displayName: "ListComponent", render: function render() { return React.createElement( "div", null, "User info" ); }
});
var MainComponent = React.createClass({ displayName: "MainComponent", handleSearch: function handleSearch(user) { getData(user).then(function (res) { console.log(res.name); }); }, render: function render() { return React.createElement( "div", null, React.createElement(SearchComponent, { onSearch: this.handleSearch }), React.createElement(ListComponent, null) ); }
});
ReactDOM.render(React.createElement(MainComponent, null), document.body);
Github profile finder - Script Codes
Github profile finder - Script Codes
Home Page Home
Developer Tushar Mehrotra
Username MTushar
Uploaded September 22, 2022
Rating 3
Size 2,514 Kb
Views 22,264
Do you need developer help for Github profile finder?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Tushar Mehrotra (MTushar) Script Codes
Create amazing Facebook ads with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!