Skip to content

Commit

Permalink
Merge branch 'staging' into 18-snp-64-google-로그인-연동
Browse files Browse the repository at this point in the history
  • Loading branch information
raymondanythings committed Dec 19, 2023
2 parents 3102b6e + 3fc6f7c commit 7a89222
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions app/(root)/(route)/auth/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
"use client";
import { useSearchParams } from "next/navigation";
import React, { useCallback, useEffect } from "react";
import axios from "axios";
const Page = () => {
const searchParam = useSearchParams();

const getUser = useCallback(async () => {
const user = await axios.get("http://localhost:4000/oauth/google/user", {
params: {
code: searchParam.get("code"),
},
});
console.log(user, "<<");
}, [searchParam]);

useEffect(() => {
getUser();
}, [getUser]);
return <div></div>;
};

export default Page;

0 comments on commit 7a89222

Please sign in to comment.