refactor: streamline layout and error handling in CabinetCreation component
This commit is contained in:
parent
27f4597348
commit
03c4988ff1
@ -36,7 +36,6 @@ function CabinetCreation() {
|
||||
});
|
||||
};
|
||||
return (
|
||||
<motion.div className="w-full h-fit" initial={{ scale: 0.9 }} animate={{ scale: 1 }} exit={{ scale: 0 }}>
|
||||
<FormBox title={t("cabinetCreation")}>
|
||||
<div className="p-2 pt-7 flex flex-col gap-4">
|
||||
<div className="flex">
|
||||
@ -63,9 +62,9 @@ function CabinetCreation() {
|
||||
{!cabinetId.valid && (
|
||||
<motion.div
|
||||
className="w-1/5 text-sm text-error ml-3 pt-1"
|
||||
initial={{ opacity: 0,scale: 0 }}
|
||||
animate={{ opacity: 1,scale: 1 }}
|
||||
exit={{ opacity: 0,scale: 0 }}
|
||||
initial={{ opacity: 0, scale: 0 }}
|
||||
animate={{ opacity: 1, scale: 1 }}
|
||||
exit={{ opacity: 0, scale: 0 }}
|
||||
key="cabinetIdError"
|
||||
>
|
||||
Invalid Cabinet Id
|
||||
@ -95,9 +94,7 @@ function CabinetCreation() {
|
||||
maxLength={6}
|
||||
/>
|
||||
{!cabinetKeyId.valid && (
|
||||
<div className="text-sm text-error ml-3 pt-1">
|
||||
Invalid Key Id
|
||||
</div>
|
||||
<div className="text-sm text-error ml-3 pt-1">Invalid Key Id</div>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
@ -132,7 +129,6 @@ function CabinetCreation() {
|
||||
}}
|
||||
/>
|
||||
</FormBox>
|
||||
</motion.div>
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user