Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
wip signin
Browse files
src/lib/stores/use-user.ts
CHANGED
@@ -1,15 +1,16 @@
|
|
1 |
import { writable } from "svelte/store";
|
2 |
import cookies from "js-cookie";
|
|
|
3 |
|
4 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
5 |
export const userStore = writable<any>(null);
|
6 |
|
7 |
export const openWindowLogin = async () => {
|
8 |
console.log(process.env.SPACE_HOST)
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
// return window.open(
|
14 |
// "/api/auth/login",
|
15 |
// "Login to LoRAs Studio",
|
|
|
1 |
import { writable } from "svelte/store";
|
2 |
import cookies from "js-cookie";
|
3 |
+
import { env } from "$env/dynamic/private";
|
4 |
|
5 |
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
6 |
export const userStore = writable<any>(null);
|
7 |
|
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.SPACE_URL as string;
|
12 |
+
return
|
13 |
+
}
|
14 |
// return window.open(
|
15 |
// "/api/auth/login",
|
16 |
// "Login to LoRAs Studio",
|