Fix some mobile styles. Fix race condition in client side

This commit is contained in:
jude
2023-07-23 12:06:03 +01:00
parent 8799089b2d
commit b4f07cfc1c
3 changed files with 43 additions and 13 deletions

View File

@ -595,7 +595,7 @@ document.querySelectorAll(".show-modal").forEach((element) => {
});
});
document.addEventListener("DOMContentLoaded", () => {
document.addEventListener("DOMContentLoaded", async () => {
$loader.classList.remove("is-hidden");
mentions.attach(document.querySelectorAll("textarea"));
@ -615,7 +615,7 @@ document.addEventListener("DOMContentLoaded", () => {
hideBox.closest(".reminderContent").classList.toggle("is-collapsed");
});
fetch("/dashboard/api/user")
await fetch("/dashboard/api/user")
.then((response) => response.json())
.then((data) => {
if (data.error) {
@ -629,7 +629,7 @@ document.addEventListener("DOMContentLoaded", () => {
}
});
fetch("/dashboard/api/user/guilds")
await fetch("/dashboard/api/user/guilds")
.then((response) => response.json())
.then((data) => {
if (data.error) {