-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from FacundoInza/feature/login-connection
signup conection with error handling
- Loading branch information
Showing
5 changed files
with
192 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import Link from 'next/link'; | ||
import React from 'react'; | ||
import { TbFaceIdError } from 'react-icons/tb'; | ||
|
||
interface ModalProps { | ||
isSuccess: boolean; | ||
message: string; | ||
onClose: () => void; | ||
} | ||
|
||
const Notification: React.FC<ModalProps> = ({ | ||
isSuccess, | ||
message, | ||
onClose, | ||
}) => { | ||
return ( | ||
<div className='fixed inset-0 flex items-center justify-center z-50 backdrop-blur-sm'> | ||
<div className='bg-white mx-3 p-4 md:p-8 w-full sm:w-3/4 lg:w-1/2 xl:w-1/3 rounded-lg shadow-2xl'> | ||
{isSuccess ? ( | ||
<div className='flex flex-col items-center justify-center'> | ||
<div className='flex items-center justify-center mb-4 md:mb-16'> | ||
<span className='text-green-400 text-4xl md:text-6xl'> | ||
✓ | ||
</span> | ||
<h3 className='font-bold text-green-400 ml-4 text-center text-xl md:text-2xl'> | ||
{message} | ||
</h3> | ||
</div> | ||
<Link className='w-2/3' href='/'> | ||
<button className='bg-green-400 text-white font-bold text-sm md:text-lg px-4 py-2 md:py-3 rounded-full w-full hover:bg-green-500'> | ||
Login | ||
</button> | ||
</Link> | ||
</div> | ||
) : ( | ||
<div className='flex flex-col items-center justify-center'> | ||
<div className='flex items-center justify-center mb-4 md:mb-16'> | ||
<span className='text-red-400 text-4xl md:text-6xl'> | ||
<TbFaceIdError /> | ||
</span> | ||
<h3 className='font-bold text-red-400 ml-4 text-center text-sm md:text-lg'> | ||
{message} | ||
</h3> | ||
</div> | ||
<button | ||
onClick={onClose} | ||
className='bg-red-400 text-white text-sm md:text-lg px-4 py-2 md:py-3 rounded-full w-2/3 hover:bg-red-500' | ||
> | ||
Retry | ||
</button> | ||
</div> | ||
)} | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Notification; |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters