|
1 | 1 | import { AuthProvider, OAuthProvider, signInWithPopup } from 'firebase/auth' |
2 | | -import { FaGithub, FaHeart } from 'react-icons/fa' |
| 2 | +import { FaGithub } from 'react-icons/fa' |
3 | 3 | import { FcGoogle } from 'react-icons/fc' |
4 | | -import { IoMdClose } from 'react-icons/io' |
5 | | -import ReactModal from 'react-modal' |
| 4 | +import { IoHeartCircle } from 'react-icons/io5' |
6 | 5 | import toast from 'react-simple-toasts' |
7 | | -import { Button } from 'src/components/Elements' |
| 6 | +import { Button, Modal } from 'src/components/Elements' |
8 | 7 | import { useAuth } from 'src/features/auth' |
9 | 8 | import { trackUserConnect } from 'src/lib/analytics' |
10 | 9 | import { firebaseAuth, githubAuthProvider, googleAuthProvider } from 'src/lib/firebase' |
@@ -45,51 +44,32 @@ export const AuthModal = ({ showAuth }: AuthModalProps) => { |
45 | 44 | } |
46 | 45 |
|
47 | 46 | return ( |
48 | | - <ReactModal |
49 | | - isOpen={showAuth} |
50 | | - ariaHideApp={false} |
51 | | - shouldCloseOnEsc={true} |
52 | | - shouldCloseOnOverlayClick={true} |
53 | | - shouldFocusAfterRender={false} |
54 | | - onRequestClose={closeAuthModal} |
55 | | - contentLabel="Auth" |
56 | | - className="Modal authModal" |
57 | | - style={{ |
58 | | - overlay: { |
59 | | - zIndex: 3, |
60 | | - }, |
| 47 | + <Modal |
| 48 | + showModal={showAuth} |
| 49 | + onClose={closeAuthModal} |
| 50 | + header={{ |
| 51 | + className: 'header', |
| 52 | + title: 'Join Hackertab', |
| 53 | + icon: <IoHeartCircle style={{ fontSize: '1.2em' }} />, |
61 | 54 | }} |
62 | | - overlayClassName="Overlay"> |
63 | | - <div className="authModal"> |
64 | | - <div className="titleAndCloseBtn"> |
65 | | - <h3> |
66 | | - <FaHeart /> Join the community |
67 | | - </h3> |
68 | | - <button className="extraBtn" onClick={closeAuthModal}> |
69 | | - <IoMdClose /> |
70 | | - </button> |
71 | | - </div> |
| 55 | + className="authModal"> |
| 56 | + <div> |
| 57 | + <p className="description">Create an account to sync, save bookmarks, and earn rewards.</p> |
72 | 58 | <div className="buttons"> |
73 | 59 | <Button |
74 | | - startIcon={<FaGithub style={{ fontSize: '1.6em' }} />} |
| 60 | + startIcon={<FaGithub className="blockHeaderWhite" style={{ fontSize: '1.5em' }} />} |
75 | 61 | onClick={() => signIn(githubAuthProvider)} |
76 | | - className="blockHeaderWhite" |
77 | 62 | size="medium"> |
78 | 63 | Connect with Github |
79 | 64 | </Button> |
80 | | - |
81 | 65 | <Button |
82 | | - startIcon={<FcGoogle style={{ fontSize: '1.6em' }} />} |
| 66 | + startIcon={<FcGoogle style={{ fontSize: '1.5em' }} />} |
83 | 67 | onClick={() => signIn(googleAuthProvider)} |
84 | 68 | size="medium"> |
85 | 69 | Connect with Google |
86 | 70 | </Button> |
87 | 71 | </div> |
88 | | - <p className="description"> |
89 | | - We use your account to save your settings and track streaks for rowards 🎁 ... or risk |
90 | | - losing them like unusaved code! |
91 | | - </p> |
92 | 72 | </div> |
93 | | - </ReactModal> |
| 73 | + </Modal> |
94 | 74 | ) |
95 | 75 | } |
0 commit comments