fix(AdminPage/index.tsx): fix asynchronous handling of updateUser function to properly reset filter and set success data after user update

fix(styleUtils.ts): fix import statement for GradientSparkles component to use curly braces for named import
This commit is contained in:
anovazzi1 2023-09-11 18:46:50 -03:00
commit 249cf833fa
3 changed files with 449 additions and 432 deletions

File diff suppressed because it is too large Load diff

View file

@ -185,11 +185,12 @@ export default function AdminPage() {
updateUser(res["id"], {
is_active: user.is_active,
is_superuser: user.is_superuser,
});
resetFilter();
setSuccessData({
title: "Success! New user added!",
});
}).then((res) => {
resetFilter();
setSuccessData({
title: "Success! New user added!",
});
})
})
.catch((error) => {
setErrorData({

View file

@ -89,7 +89,7 @@ import { EvernoteIcon } from "../icons/Evernote";
import { FBIcon } from "../icons/FacebookMessenger";
import { GitBookIcon } from "../icons/GitBook";
import { GoogleIcon } from "../icons/Google";
import GradientSparkles from "../icons/GradientSparkles";
import {GradientSparkles} from "../icons/GradientSparkles";
import { HuggingFaceIcon } from "../icons/HuggingFace";
import { IFixIcon } from "../icons/IFixIt";
import { MetaIcon } from "../icons/Meta";