Git Product home page Git Product logo

z-bj / devcover Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 940 KB

๐Ÿ“ˆ๐Ÿ’ธ ๐‚๐ซ๐ž๐š๐ญ๐ž ๐ฆ๐จ๐ฆ๐ž๐ง๐ญ๐ฎ๐ฆ ๐ข๐ง ๐ฒ๐จ๐ฎ๐ซ ๐๐ž๐ฏ ๐ฌ๐จ๐ฎ๐ซ๐œ๐ข๐ง๐  ๐ฉ๐ซ๐จ๐œ๐ž๐ฌ๐ฌ. โ€” Github user search app that allows recruiter to search for Developer by their username.

Home Page: https://z-bj.github.io/DEVCOVER/

License: MIT License

HTML 2.93% CSS 48.05% TypeScript 49.02%
react typescript 3rd-party-api github business sourcing hr human-ressource-management

devcover's Introduction

banner

figmaTSReactcssModulesjestvercelvite

Introducing Devcover

Github user search app that allows recruiter to search for Developer by their username.

Desktop

desktop

Mobile

mobile

Features

  • View the optimal layout for the app depending on device screen size
  • See hover states for all interactive elements on the page
  • Search for GitHub users by their username
  • See relevant user information based on their search
  • Switch between light and dark themes

API

The app utilizes the Github REST API to retrieve user information. The API provides access to a wide range of Github resources, including user profiles, repositories, organizations, and more. For more information about the Github REST API and its endpoints, please see the GitHub REST API documentation.

Note that for unauthenticated requests, the rate limit allows for up to 60 requests per hour. Unauthenticated requests are associated with the originating IP address and not the user making requests.

Main.tsx

import React, { useCallback, useEffect, useState } from "react";

import ky from "ky"; // Import the ky HTTP library
import Input from "./Input";
import Card from "./Card";

const Main = () => {
  const [user, setUser] = useState("z-bj");
  const [choice, setChoice] = useState("z-bj");
  const [error, setError] = useState("");

  const changeUser = (newUser) => {
    setChoice(newUser);
  };

  // Define the fetchUserHandler function with useCallback to memoize the function
  const fetchUserHandler = useCallback(async () => {
    setError("");

    try {
    
      const response = await ky(`https://api.github.com/users/${choice}`);

      if (!response.ok) {
        throw new Error();
      }

      const newUser = await response.json();

      setUser(newUser);
    } catch (err) {
      console.log(err.message);
      setError("No results");
    }
  }, [choice]);

  // Call fetchUserHandler on component mount
  useEffect(() => {
    fetchUserHandler();
  }, [fetchUserHandler]);

  return (
    <main>
          <Input changeUser={changeUser} error={error} />
          <Card user={user} />
    </main>
  );
};

export default Main;

Built with

The app is built with the following tools and technologies:

  • Vite: Next Generation Fronted Tooling
  • Typescript
  • React - JS library
  • Ky: Delightful HTTP Requests
  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Grid
  • Mobile-first workflow

Color theme

color

Font

type

Installation

To run this app on your local machine:

  1. Clone the repository using git clone https://github.com/z-bj/DEVCOVER.git.
  2. Navigate to the project directory using `cd Make-it-blink.
  3. Install the dependencies using npm install.
  4. Start the development server using npm start.

Contributing

Contributions are welcome! To contribute to this project:

  1. Fork the repository.
  2. Make your changes.
  3. Submit a pull request.

License

This project is licensed under the MIT License.

devcover's People

Contributors

z-bj avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.