aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/packages/ui-new/src/stores/game-store.ts
diff options
context:
space:
mode:
author苏向夜 <fu050409@163.com>2026-02-25 00:16:53 +0800
committer苏向夜 <fu050409@163.com>2026-02-25 00:16:53 +0800
commita6773bd092db654360c599ca6b0108ea0e456e8c (patch)
treec78c802a2563fff7aef908532a0706c0299830ac /packages/ui-new/src/stores/game-store.ts
parentb275a3668b140d9ce4663de646519d2dbd4297e7 (diff)
downloadDropOut-a6773bd092db654360c599ca6b0108ea0e456e8c.tar.gz
DropOut-a6773bd092db654360c599ca6b0108ea0e456e8c.zip
feat: prepare for nightly alpha
Diffstat (limited to 'packages/ui-new/src/stores/game-store.ts')
-rw-r--r--packages/ui-new/src/stores/game-store.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/ui-new/src/stores/game-store.ts b/packages/ui-new/src/stores/game-store.ts
index 541b386..fa0f9f8 100644
--- a/packages/ui-new/src/stores/game-store.ts
+++ b/packages/ui-new/src/stores/game-store.ts
@@ -1,6 +1,6 @@
-import { invoke } from "@tauri-apps/api/core";
import { toast } from "sonner";
import { create } from "zustand";
+import { getVersions } from "@/client";
import type { Version } from "@/types/bindings/manifest";
interface GameState {
@@ -39,7 +39,7 @@ export const useGameStore = create<GameState>((set, get) => ({
try {
// Ask the backend for known versions (optionally scoped to an instance).
// The Tauri command `get_versions` is expected to return an array of `Version`.
- const versions = await invoke<Version[]>("get_versions", { instanceId });
+ const versions = await getVersions();
set({ versions: versions ?? [] });
} catch (e) {
console.error("Failed to load versions:", e);