Spaces:
Running
Running
wip signin
Browse files
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",
|