UsamaBinKashif / Google-Clone-2.0

Google Clone 2.0

Home Page:https://google-clonev2.vercel.app/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Google Clone 2.0

Table of contents

Links


Video

scrnli_8_8_2022_8-39-49.AM.mp4

Built with

  • React
  • Context API
  • Tailwind CSS
  • Google Search API

Custom Google Search ⬇

const UseGoogleSearch = (term) => {

    const [data, setData] = useState(null);

    useEffect(() => {
        const fetchData = async () => {
            fetch(`https://www.googleapis.com/customsearch/v1?key=${API_KEY}&cx=${CONTEXT_KEY}&q=${term}`)
                .then(response => response.json())
                .then(result => {
                    setData(result)
                })
        }
        fetchData().then(res => {
            console.log(res);
        }).catch(error => {
            console.log(error);
        });
    }, [term]);

    return {data};
};

Author

Credits

About

Google Clone 2.0

https://google-clonev2.vercel.app/


Languages

Language:JavaScript 95.0%Language:HTML 3.2%Language:CSS 1.4%Language:Shell 0.3%