├── .eslintrc.json
├── .gitignore
├── CONTRIBUTING.md
├── README.md
├── components
├── Header.jsx
├── Navbar.jsx
├── Repo.jsx
├── Repositories.jsx
└── UserProfile.jsx
├── firebase.js
├── next.config.js
├── package.json
├── pages
├── _app.js
├── api
│ └── hello.js
└── index.js
├── postcss.config.js
├── public
├── default_image.png
└── favicon.png
├── styles
└── globals.css
├── tailwind.config.js
└── yarn.lock
/.eslintrc.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": "next/core-web-vitals"
3 | }
4 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 | /.pnp
6 | .pnp.js
7 |
8 | # testing
9 | /coverage
10 |
11 | # next.js
12 | /.next/
13 | /out/
14 |
15 | # production
16 | /build
17 |
18 | # misc
19 | .DS_Store
20 | *.pem
21 |
22 | # debug
23 | npm-debug.log*
24 | yarn-debug.log*
25 | yarn-error.log*
26 | .pnpm-debug.log*
27 |
28 | # local env files
29 | .env*.local
30 |
31 | # vercel
32 | .vercel
33 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | # Contribution guide
2 |
3 | If you're interested in contributing to this project, great! This file should help you get started.
4 |
5 | ## Types of contribution
6 |
7 | There are many ways you can help improve this repository! For example:
8 |
9 | - **Write a brand-new example:** for example, you might notice that there are no
10 | examples for a particular.
11 | - **Improve an existing example:** for example,
12 | you might notice a problem with an existing example, or some way it could be made more helpful.
13 | - **Fix a bug:** we have a list of issues,
14 | or maybe you found your own.
15 |
16 | ## Good first issues
17 |
18 | - [Examples needed]
19 | - [Help wanted]
20 |
21 | ## Setup
22 |
23 | To contribute live examples all you need is a text editor, git, a GitHub account, and Nodejs.
24 |
25 | As far as text/code editors go, there are more editors than you can shake a stick at, so it's down to personal preference. [Visual Studio](https://code.visualstudio.com/download) and [Atom](https://atom.io/) are great editors we can definitely recommend.
26 |
27 | For more information on setting up Git on your machine, [read this article](https://help.github.com/articles/set-up-git/).
28 |
29 | With the above dependencies satisfied, [create your new account on Github](https://github.com/join).
30 |
31 | Lastly, [install Nodejs for your operating system](https://nodejs.org/).
32 |
33 | ### Fork and clone
34 |
35 | Next up, you need to fork and clone the repo to be able to contribute to it. You can [learn about forking on Github](https://help.github.com/articles/fork-a-repo). Once you have your own fork, [clone it to your local machine](https://help.github.com/articles/cloning-a-repository/).
36 |
37 | ## Testing
38 |
39 | Once you've written an example you can run a local server to try it out.
40 |
41 | Once you're satisfied, the final step is to [submit your pull request](https://help.github.com/articles/creating-a-pull-request/).
42 |
43 | ## Thank you!
44 |
45 | Thank you for your contribution ~ o/\o
46 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | This is a [Next.js](https://nextjs.org/) project bootstrapped with [`create-next-app`](https://github.com/vercel/next.js/tree/canary/packages/create-next-app).
2 |
3 | live site - https://gitalt.netlify.app/
4 |
5 | ### Screenshots 📷
6 |
7 | 
8 |
9 | 
10 |
11 | ## Steps / Guidance
12 | * You can search any github authorized user in this app and checkout there profile
13 | * for searching the user you can see a search bar on the top left
14 | * once you write user's github username in the search bar then press enter to get the details of the user
15 | * and you check his repositories maximum upto 30, thats the repo limit from GitHub API
16 |
17 |
18 | ## Getting Started
19 |
20 | First, run the development server:
21 |
22 | ```bash
23 | npm run dev
24 | # or
25 | yarn dev
26 | ```
27 |
28 | Open [http://localhost:3000](http://localhost:3000) with your browser to see the result.
29 |
30 | You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.
31 |
32 | [API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3000/api/hello](http://localhost:3000/api/hello). This endpoint can be edited in `pages/api/hello.js`.
33 |
34 | The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.
35 |
36 | ## Learn More
37 |
38 | To learn more about Next.js, take a look at the following resources:
39 |
40 | - [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
41 | - [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial.
42 |
43 | You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!
44 |
45 | ## Deploy on Vercel
46 |
47 | The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js.
48 |
49 | Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
50 |
--------------------------------------------------------------------------------
/components/Header.jsx:
--------------------------------------------------------------------------------
1 | import { signInWithPopup, signOut } from 'firebase/auth'
2 | import { useState } from 'react'
3 | import { AiFillGithub } from 'react-icons/ai'
4 | import { BiBell } from 'react-icons/bi'
5 | import { CgFormatSlash } from 'react-icons/cg'
6 | import { FiLogIn } from 'react-icons/fi'
7 | import { HiOutlineMenu } from 'react-icons/hi'
8 | import { IoMdArrowDropdown } from 'react-icons/io'
9 | import { MdLogout } from 'react-icons/md'
10 | import { auth, provider } from '../firebase'
11 |
12 | const Navbar = ({ searchValue, setSearchValue, fetchUser }) => {
13 |
14 | const [currentUser, setCurrentUser] = useState(null)
15 | const [showModal, setShowModal] = useState(false)
16 | const [showMenu, setShowMenu] = useState(false)
17 |
18 | const handleSignIn = () => {
19 | signInWithPopup(auth, provider)
20 | .then((result) => {
21 | setCurrentUser(result.user)
22 | }).catch((error) => {
23 | console.log(error)
24 | });
25 | }
26 |
27 | const handleSignOut = () => {
28 | signOut(auth).then(() => console.log("Signed Out"))
29 | setCurrentUser(null)
30 | }
31 |
32 | return (
33 | <>
34 | {/* Header */}
35 |