Skip to content

Commit 3d3e23c

Browse files
committed
fix build
1 parent 8e54cb0 commit 3d3e23c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/lib/state/token.svelte.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
import { env } from "$env/dynamic/public";
12
import { safeParse } from "$lib/utils/json.js";
2-
import { PUBLIC_HF_TOKEN } from "$env/static/public";
33
import typia from "typia";
44

55
const key = "hf_token";
@@ -9,8 +9,8 @@ class Token {
99
writeToLocalStorage = $state(true);
1010

1111
constructor() {
12-
if (PUBLIC_HF_TOKEN) {
13-
this.#value = PUBLIC_HF_TOKEN;
12+
if (env.PUBLIC_HF_TOKEN) {
13+
this.#value = env.PUBLIC_HF_TOKEN;
1414
return;
1515
}
1616

@@ -59,7 +59,7 @@ class Token {
5959
reset = () => {
6060
this.value = "";
6161
localStorage.removeItem(key);
62-
if (!PUBLIC_HF_TOKEN) {
62+
if (!env.PUBLIC_HF_TOKEN) {
6363
this.requestTokenFromParent();
6464
}
6565
};

0 commit comments

Comments
 (0)