enzostvs HF staff commited on
Commit
8ba3d1e
·
1 Parent(s): ced6222

wip signin

Browse files
Files changed (1) hide show
  1. src/lib/stores/use-user.ts +6 -5
src/lib/stores/use-user.ts CHANGED
@@ -8,14 +8,15 @@ export const userStore = writable<any>(null);
8
  export const openWindowLogin = async () => {
9
  console.log(process.env.SPACE_HOST)
10
  if (window.location.host.includes("huggingface.co")) {
 
11
  window.location.href = env.PUBLIC_SPACE_URL as string;
12
  return
13
  }
14
- // return window.open(
15
- // "/api/auth/login",
16
- // "Login to LoRAs Studio",
17
- // "menubar=no,width=500,height=777,location=no,resizable=no,scrollbars=yes,status=no"
18
- // );
19
  };
20
 
21
  export const loginFromCode = async (code: string) => {
 
8
  export const openWindowLogin = async () => {
9
  console.log(process.env.SPACE_HOST)
10
  if (window.location.host.includes("huggingface.co")) {
11
+ console.log("redirecting to public space", env.PUBLIC_SPACE_URL)
12
  window.location.href = env.PUBLIC_SPACE_URL as string;
13
  return
14
  }
15
+ return window.open(
16
+ "/api/auth/login",
17
+ "Login to LoRAs Studio",
18
+ "menubar=no,width=500,height=777,location=no,resizable=no,scrollbars=yes,status=no"
19
+ );
20
  };
21
 
22
  export const loginFromCode = async (code: string) => {