feat(03-01): add loading spinners to Login, Register, and BudgetSetup submit buttons
- LoginPage: Spinner replaces button text during loading, min-w-[120px] prevents layout shift - RegisterPage: Spinner replaces button text during loading, min-w-[120px] prevents layout shift - BudgetSetup: Spinner replaces create button text during saving, min-w-[120px] prevents layout shift - All buttons remain disabled during loading/saving to prevent double-submit
This commit is contained in:
@@ -5,6 +5,7 @@ import { Button } from '@/components/ui/button'
|
||||
import { Card, CardContent, CardFooter, CardHeader, CardTitle } from '@/components/ui/card'
|
||||
import { Input } from '@/components/ui/input'
|
||||
import { Alert, AlertDescription } from '@/components/ui/alert'
|
||||
import { Spinner } from '@/components/ui/spinner'
|
||||
import { palette } from '@/lib/palette'
|
||||
import type { AuthContext } from '@/hooks/useAuth'
|
||||
|
||||
@@ -86,8 +87,8 @@ export function RegisterPage({ auth: { register }, onToggle }: Props) {
|
||||
required
|
||||
minLength={8}
|
||||
/>
|
||||
<Button type="submit" disabled={loading} className="w-full">
|
||||
{t('auth.register')}
|
||||
<Button type="submit" disabled={loading} className="w-full min-w-[120px]">
|
||||
{loading ? <Spinner /> : t('auth.register')}
|
||||
</Button>
|
||||
</CardContent>
|
||||
</form>
|
||||
|
||||
Reference in New Issue
Block a user