UI/refactor: unify clan details and edit

This commit is contained in:
Johannes Kirschbauer
2024-09-04 10:16:08 +02:00
parent f6b393f12c
commit 9d1c963c03
11 changed files with 470 additions and 494 deletions

View File

@@ -0,0 +1,21 @@
import { callApi } from "../api";
import { setActiveURI, setClanList } from "../App";
export const registerClan = async () => {
try {
const loc = await callApi("open_file", {
file_request: { mode: "select_folder" },
});
if (loc.status === "success" && loc.data) {
const data = loc.data[0];
setClanList((s) => {
const res = new Set([...s, data]);
return Array.from(res);
});
setActiveURI(data);
return data;
}
} catch (e) {
//
}
};