Spaces:
Runtime error
Runtime error
hf sign in
Browse files- app/login/callback/page.tsx +3 -2
- components/main/index.tsx +1 -3
app/login/callback/page.tsx
CHANGED
@@ -26,13 +26,14 @@ async function getAuth(code: string) {
|
|
26 |
// .json()
|
27 |
// .catch(() => ({}));
|
28 |
|
|
|
29 |
// if (!response.access_token) {
|
30 |
// return response;
|
31 |
// }
|
32 |
// // @ts-ignore
|
33 |
// cookies.set("access_token", response.access_token, {});
|
34 |
|
35 |
-
return
|
36 |
} catch (error) {
|
37 |
return error;
|
38 |
}
|
@@ -47,7 +48,7 @@ export default async function LoginCallback({
|
|
47 |
return (
|
48 |
<div className="pb-32 text-white">
|
49 |
<p className="font-bold text-4xl text-white">LOGIN CALLBACK</p>
|
50 |
-
{profile && JSON.stringify(profile, null, 2)}
|
51 |
</div>
|
52 |
);
|
53 |
}
|
|
|
26 |
// .json()
|
27 |
// .catch(() => ({}));
|
28 |
|
29 |
+
// console.log(response);
|
30 |
// if (!response.access_token) {
|
31 |
// return response;
|
32 |
// }
|
33 |
// // @ts-ignore
|
34 |
// cookies.set("access_token", response.access_token, {});
|
35 |
|
36 |
+
return null;
|
37 |
} catch (error) {
|
38 |
return error;
|
39 |
}
|
|
|
48 |
return (
|
49 |
<div className="pb-32 text-white">
|
50 |
<p className="font-bold text-4xl text-white">LOGIN CALLBACK</p>
|
51 |
+
{/* {profile && JSON.stringify(profile, null, 2)} */}
|
52 |
</div>
|
53 |
);
|
54 |
}
|
components/main/index.tsx
CHANGED
@@ -40,11 +40,9 @@ export const Main = () => {
|
|
40 |
<div className="items-center justify-center lg:justify-end gap-5 w-full mt-6 lg:mt-0 hidden lg:flex">
|
41 |
{categories.map(({ key, label, icon, isLogged }) =>
|
42 |
isLogged && !user ? (
|
43 |
-
// <Button key={key} theme="white" onClick={openWindowLogin}>
|
44 |
-
// Sign in with Hugging Face
|
45 |
-
// </Button>
|
46 |
<img
|
47 |
src="https://huggingface.co/datasets/huggingface/badges/resolve/main/sign-in-with-huggingface-xl.svg"
|
|
|
48 |
onClick={openWindowLogin}
|
49 |
/>
|
50 |
) : (
|
|
|
40 |
<div className="items-center justify-center lg:justify-end gap-5 w-full mt-6 lg:mt-0 hidden lg:flex">
|
41 |
{categories.map(({ key, label, icon, isLogged }) =>
|
42 |
isLogged && !user ? (
|
|
|
|
|
|
|
43 |
<img
|
44 |
src="https://huggingface.co/datasets/huggingface/badges/resolve/main/sign-in-with-huggingface-xl.svg"
|
45 |
+
className="cursor-pointer hover:-translate-y-1 transition-all duration-200"
|
46 |
onClick={openWindowLogin}
|
47 |
/>
|
48 |
) : (
|