SnippSync

Always Fresh Code

LoginPage.tsx

musiquetheorie
Lines 1-21
Auto-synced 71 days ago
This snippet automatically syncs with your GitHub repository
SnippSync
TS
LoginPage.tsx
2import { authService, AuthUser } from '../../services/authService';
3
4interface LoginPageProps {
5  onLogin: (user: AuthUser) => void;
6}
7
8export default function LoginPage({ onLogin }: LoginPageProps) {
9  const [isSignUp, setIsSignUp] = useState(false);
10  const [email, setEmail] = useState('');
11  const [password, setPassword] = useState('');
12  const [displayName, setDisplayName] = useState('');
13  const [loading, setLoading] = useState(false);
14  const [error, setError] = useState('');
15
16  const handleSubmit = async (e: React.FormEvent) => {
17    e.preventDefault();
18    setLoading(true);
19    setError('');
20
21    try {
22      if (isSignUp) {

Powered by SnippSync • Always fresh, always in sync

Create Your Own Auto-Synced Snippets

Keep Your Documentation Always Fresh

Create snippets that automatically sync with your GitHub repositories. Never worry about outdated documentation again.

Auto-sync with GitHub
Beautiful embeds
Share anywhere