Skip to content

Commit

Permalink
Feat: Add spinner and status change
Browse files Browse the repository at this point in the history
  • Loading branch information
swgvenghy committed Jul 3, 2024
1 parent 42f348c commit 1c37f38
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/ui/pages/admin/login.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React, { useState } from 'react';
import { useUser, handleLogin } from '../../../api/admin-login';
import { CircularProgress } from '@mui/material';

export default function Login() {
const [email, setEmail] = useState<string>('');
Expand Down Expand Up @@ -66,13 +67,13 @@ export default function Login() {
/>
</div>
</div>
{isError ? <div>다시 로그인해주세요</div> : ''}
{isError ? '' : <div>다시 로그인해주세요</div>}
<div>
<button
type="submit"
className="flex w-full justify-center rounded-md bg-indigo-600 px-3 py-1.5 text-lg font-semibold leading-6 text-white shadow-sm hover:bg-indigo-500 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-indigo-600"
>
Sign in
{isLoading ? <CircularProgress color="inherit" /> : 'Sign in'}
</button>
</div>
</form>
Expand Down

0 comments on commit 1c37f38

Please sign in to comment.