Skip to content

Commit 9e2cf47

Browse files
refactor(auth): use Spinner in Google login
- Replaced custom inline spinner with `Spinner` component in Google sign-in button. - Added `role="status"` to `Spinner` component for better accessibility. - Removed unnecessary `pnpm-lock.yaml` file.
1 parent 5a2f655 commit 9e2cf47

File tree

3 files changed

+3
-2887
lines changed

3 files changed

+3
-2887
lines changed

web/components/ui/Spinner.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export const Spinner: React.FC<SpinnerProps> = ({ className = '', size = 18, ari
1313
className={`animate-spin ${className}`}
1414
size={size}
1515
aria-label={ariaLabel}
16+
role="status"
1617
/>
1718
);
1819
};

web/pages/Auth.tsx

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ArrowRight, CreditCard, Sparkles } from 'lucide-react';
33
import React, { useState } from 'react';
44
import { useNavigate } from 'react-router-dom';
55
import { Button } from '../components/ui/Button';
6+
import { Spinner } from '../components/ui/Spinner';
67
import { Input } from '../components/ui/Input';
78
import { THEMES } from '../constants';
89
import { useAuth } from '../contexts/AuthContext';
@@ -170,11 +171,7 @@ export const Auth = () => {
170171
}`}
171172
>
172173
{googleLoading ? (
173-
<div
174-
className="w-5 h-5 border-2 border-black/20 border-t-black rounded-full animate-spin"
175-
role="status"
176-
aria-label="Signing in with Google"
177-
/>
174+
<Spinner size={20} ariaLabel="Signing in with Google" />
178175
) : (
179176
<svg className="w-5 h-5" viewBox="0 0 24 24" role="img" aria-labelledby="google-logo-title">
180177
<title id="google-logo-title">Google logo</title>

0 commit comments

Comments
 (0)