redirect to ed

This commit is contained in:
Rizky 2024-01-24 00:22:07 +07:00
parent 22d6821986
commit b0608a1bec
3 changed files with 6 additions and 6 deletions

View File

@ -19,7 +19,7 @@ export default page({
} else if (location.pathname.startsWith("/editor")) {
const arr = location.pathname.split("/");
if (arr.length <= 2) {
navigate("/editor/_/_");
navigate("/ed/_/_");
} else if (arr.length === 3) {
navigate(location.pathname + "/");
}
@ -27,7 +27,7 @@ export default page({
if (isLocalhost()) {
navigate("/ed");
} else {
navigate("/editor/_/_");
navigate("/ed/_/_");
}
}
} else {

View File

@ -22,7 +22,7 @@ export default page({
navigate(rto);
} else {
localStorage.setItem("prasi-session", JSON.stringify(s));
navigate("/editor/");
navigate("/ed/");
}
} else {
form.init = true;
@ -60,7 +60,7 @@ export default page({
if (location.href.includes("localhost")) {
navigate("/ed");
} else {
navigate("/editor");
navigate("/ed");
}
}
}

View File

@ -19,7 +19,7 @@ export default page({
const s = await api.session();
if (s && s.id) {
navigate("/editor");
navigate("/ed");
} else {
form.init = true;
form.render();
@ -47,7 +47,7 @@ export default page({
form.render();
alert(s.reason);
} else {
navigate("/editor");
navigate("/ed");
}
}}
className={cx("border-[3px] border-black", formStyle)}