Please note that this project is in progress. If you encounter bugs please report them in the issues section of the GitHub repo.
Also, please feel free to contribute! (See Contributing below)
GitHubProfile is a React component designed to display a user's GitHub profile information and activity. It retrieves data from the GitHub API, including user details such as avatar, name, bio, public repositories, and followers. Additionally, it renders a GitHub activity calendar using the react-github-calendar
package.
<GitHubProfile />
accepts the following props:
-
userName
: The GitHub username of the user whose profile you want to display.
<GitHubProfile userName="tommypurcell" />
To use the GitHubProfile.jsx component in your React project, follow these steps:
-
Install the required dependencies
npm install axios react-github-calendar prop-types
-
Include the component in your project directory.
-
Import the component into your React application:
import GitHubProfile from './GitHubProfile.jsx'
-
Render the component in your application, passing the required props:
<GitHubProfile userName="yourGitHubUsername" />
-
userName
(required): The GitHub username of the user whose profile you want to display.
import React from 'react'
import GitHubProfile from './GitHubProfile.jsx'
function App() {
return (
<div>
<h1>GitHub Profile</h1>
<GitHubProfile userName="octocat" />
</div>
)
}
export default App
- axios: Promise-based HTTP client for making requests to the GitHub API.
- react-github-calendar: React component to display a user's GitHub activity calendar.
- prop-types: Runtime type checking for React props.
Thank you for your interest in contributing to the React GitHub Profile component! Follow these steps to contribute:
- Review Issues
- Check the issues section to find something to work on.
- If you have a new idea, create a new issue and describe it.
- Discussion: Please discuss the issue with the maintainers before starting to ensure alignment and avoid wasted effort.
- Clone the Project Clone the repository to your local machine.
- Create a New Branch Make a new branch for your changes and push your changes to this branch.
- Submit a Pull Request Submit a pull request to merge your branch into the main branch.
- Wait for Review Wait for your pull request to be reviewed and make any requested changes.
- Done! Once your pull request is approved and merged, you're done! Thanks for contributing. :)
This project is licensed under the MIT License - see the LICENSE file for details.