From a52b450d98f8cb7c7dbf52ab7000e07ca88c6c7f Mon Sep 17 00:00:00 2001 From: Anthony Guido Date: Sun, 10 Nov 2024 15:55:12 +0100 Subject: [PATCH] feat: add loading state --- .../components/WizardSteps/UserNameForm/UserNameForm.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/Wizard/components/WizardSteps/UserNameForm/UserNameForm.tsx b/src/components/Wizard/components/WizardSteps/UserNameForm/UserNameForm.tsx index 3994377..64eb88a 100644 --- a/src/components/Wizard/components/WizardSteps/UserNameForm/UserNameForm.tsx +++ b/src/components/Wizard/components/WizardSteps/UserNameForm/UserNameForm.tsx @@ -1,6 +1,6 @@ import { FormEvent, useState } from "react"; import { useUserInfo } from "../../../../../hooks/useUserInfo"; -import { TextField, Button, Alert } from "@mui/material"; +import { TextField, Button, Alert, CircularProgress } from "@mui/material"; export const UserNameForm: React.FC = () => { const { @@ -40,8 +40,11 @@ export const UserNameForm: React.FC = () => { color="primary" role="submit" disabled={isLoading} + startIcon={ + isLoading ? : null + } > - Submit + {isLoading ? "Loading..." : "Submit"} );