enzostvs HF Staff commited on
Commit
835817b
·
1 Parent(s): 1d8a7fb

wip signin

Browse files
Files changed (1) hide show
  1. src/lib/stores/use-user.ts +4 -0
src/lib/stores/use-user.ts CHANGED
@@ -5,6 +5,10 @@ import cookies from "js-cookie";
5
  export const userStore = writable<any>(null);
6
 
7
  export const openWindowLogin = async () => {
 
 
 
 
8
  return window.open(
9
  "/api/auth/login",
10
  "Login to LoRAs Studio",
 
5
  export const userStore = writable<any>(null);
6
 
7
  export const openWindowLogin = async () => {
8
+ if (window.location.pathname !== process.env.SPACE_HOST) {
9
+ window.location.href = `https://${process.env.SPACE_HOST}`;
10
+ return
11
+ }
12
  return window.open(
13
  "/api/auth/login",
14
  "Login to LoRAs Studio",