Skip to content

Commit 7a4fed8

Browse files
Update Setup.tsx
1 parent 880cef8 commit 7a4fed8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/Setup.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,6 @@ export default function Setup() {
186186
console.log(`Init State: ${int}`);
187187
let data: User = JSON.parse(sessionStorage.getItem("new-user") as string);
188188
sessionStorage.setItem("new-user", JSON.stringify(data));
189-
// Types being weird idk
190-
if (data.email) {
191-
delete (data as any).password;
192-
await window.tb.fs.promises.writeFile("/system/etc/terbium/taccs.json", JSON.stringify([data], null, 2), "utf8");
193-
} else {
194-
await window.tb.fs.promises.writeFile("/system/etc/terbium/taccs.json", JSON.stringify([], null, 2), "utf8");
195-
}
196189
const usr = data["username"];
197190
data["id"] = usr;
198191
let pass: any;
@@ -201,6 +194,13 @@ export default function Setup() {
201194
} else {
202195
pass = false;
203196
}
197+
// Types being weird idk
198+
if (data.email) {
199+
delete (data as any).password;
200+
await window.tb.fs.promises.writeFile("/system/etc/terbium/taccs.json", JSON.stringify([data], null, 2), "utf8");
201+
} else {
202+
await window.tb.fs.promises.writeFile("/system/etc/terbium/taccs.json", JSON.stringify([], null, 2), "utf8");
203+
}
204204
const userInf: User = {
205205
id: usr,
206206
username: usr,

0 commit comments

Comments
 (0)