|
1 | 1 | import React from 'react'; |
2 | 2 | import Image from 'next/image'; |
3 | 3 | import logo from '../../../public/images/logo.png'; |
4 | | -import google from '../../../public/images/google.png'; |
5 | 4 | import github from '../../../public/images/github.png'; |
6 | 5 | import check from '../../../public/images/Success.svg'; |
7 | 6 | import Link from 'next/link'; |
8 | | -import Footer from '@/components/global/footer/Footer'; |
9 | | -import Copyright from '@/components/global/footer/Copyright'; |
10 | | -import Donations from '@/components/global/footer/Donations'; |
| 7 | +import GoogleLogin from 'react-google-login'; |
| 8 | +import MiniFooter from '@/components/global/minifooter'; |
11 | 9 |
|
12 | 10 | const RegisterComponent = () => { |
| 11 | + const responseGoogleSuccess = (response: any) => { |
| 12 | + console.log('Google login success:', response); |
| 13 | + }; |
| 14 | + |
| 15 | + const responseGoogleFailure = (error: any) => { |
| 16 | + console.error('Google login error:', error); |
| 17 | + }; |
| 18 | + |
| 19 | + const handleGithubLogin = async () => { |
| 20 | + try { |
| 21 | + window.location.href = `https://github.com/login/oauth/authorize?client_id=YOUR_CLIENT_ID&redirect_uri=YOUR_REDIRECT_URI&scope=user`; |
| 22 | + } catch (error) { |
| 23 | + console.error('Error initiating GitHub login:', error); |
| 24 | + } |
| 25 | + }; |
13 | 26 | return ( |
14 | 27 | <> |
15 | 28 | <div |
16 | | - className="Maincontainer bg-dark-600 h-screen d-flex justify-content-center align-items-center w-full" |
17 | | - style={{ height: '100vh' }} |
| 29 | + className="Maincontainer bg-dark-600 d-flex justify-content-center align-items-center w-full" |
| 30 | + style={{ height: 'auto !important', minHeight: '100vh' }} |
18 | 31 | > |
19 | | - <div className="container w-full pt-6 gap-20" style={{ display: 'flex', justifyContent: 'center' }}> |
| 32 | + <div className="container w-full pt-6 px-6 gap-20" style={{ display: 'flex', justifyContent: 'center' ,marginTop:"-35px"}}> |
20 | 33 | <div className="mt-20"> |
21 | 34 | <Image src={logo} alt="logo" className=" text-center" /> |
22 | 35 | <div style={{ display: 'flex', alignItems: 'center' }} className="mt-3"> |
@@ -50,23 +63,28 @@ const RegisterComponent = () => { |
50 | 63 | </div> |
51 | 64 | </div> |
52 | 65 | <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center' }}> |
53 | | - <div className="sec-box bg-white rounded px-10 mt-8 py-5" style={{ height: '645px', width: '464px' }}> |
| 66 | + <div className="sec-box bg-white rounded px-10 mt-8 py-5" style={{ height: 'auto !important', width: '464px' }}> |
54 | 67 | <p className="text-black text-xl font-weight-bold mt-4 text-center" style={{ fontSize: '1.5rem' }}> |
55 | 68 | Register |
56 | 69 | </p> |
57 | | - <button |
58 | | - className="rounded border py-2 mt-6 w-full gap-3" |
59 | | - style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }} |
| 70 | + <GoogleLogin |
| 71 | + clientId="YOUR_GOOGLE_CLIENT_ID" |
| 72 | + onSuccess={responseGoogleSuccess} |
| 73 | + onFailure={responseGoogleFailure} |
| 74 | + cookiePolicy={'single_host_origin'} |
| 75 | + className="box rounded py-2 mt-6 w-full gap-3 text-cente" |
60 | 76 | > |
61 | | - <Image src={google} alt="logo" /> |
62 | 77 | <p className="text-black font-weight-bold">LOGIN WITH GOOGLE</p> |
63 | | - </button> |
| 78 | + </GoogleLogin> |
64 | 79 | <button |
| 80 | + onClick={handleGithubLogin} |
65 | 81 | className="rounded border py-2 text-black font-weight-bold mt-2 w-full gap-3" |
66 | 82 | style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', justifyContent: 'center' }} |
67 | 83 | > |
68 | 84 | <Image src={github} alt="logo" /> |
69 | | - <p className="text-black font-weight-bold">LOGIN WITH GITHUB</p> |
| 85 | + <p className="text-black font-weight-bold" style={{ marginLeft: '17px' }}> |
| 86 | + LOGIN WITH GITHUB |
| 87 | + </p> |
70 | 88 | </button> |
71 | 89 | <p className="text-black text-md font-weight-bold mt-5 text-center">or</p> |
72 | 90 | <input |
@@ -94,10 +112,27 @@ const RegisterComponent = () => { |
94 | 112 | REGISTER |
95 | 113 | </button> |
96 | 114 | <p className="text-black text-md font-weight-bold mt-9 text-center"> |
97 | | - By clicking “Create account” or “Continue with Google” or “Continue with Github”, you agree to the |
98 | | - jiffyscan.xyz <span style={{ color: '#1976D2' }}>Terms of Service</span> and |
99 | | - <span style={{ color: '#1976D2' }}>Privacy Policy</span> |
| 115 | + By clicking “Create account” or “Continue with Google” or “Continue with Github”, you agree to the |
| 116 | + jiffyscan.xyz |
| 117 | + <a |
| 118 | + href="https://www.notion.so/adityaagarwal/Terms-of-Use-0012b80699cc4b948cdae9e42983035b" |
| 119 | + style={{ color: '#1976D2' }} |
| 120 | + target="_blank" |
| 121 | + rel="noopener noreferrer" |
| 122 | + > |
| 123 | + Terms of Service |
| 124 | + </a> |
| 125 | + and |
| 126 | + <a |
| 127 | + href="https://adityaagarwal.notion.site/Privacy-Policy-5f05315af636474797f1255d338a0d76?pvs=4" |
| 128 | + style={{ color: '#1976D2' }} |
| 129 | + target="_blank" |
| 130 | + rel="noopener noreferrer" |
| 131 | + > |
| 132 | + Privacy Policy |
| 133 | + </a> |
100 | 134 | </p> |
| 135 | + |
101 | 136 | <Link href="/login"> |
102 | 137 | <p className=" text-black text-md font-weight-bold mt-5 text-center"> |
103 | 138 | Already have an account? <span style={{ color: '#1976D2' }}>Log in</span> |
@@ -134,25 +169,23 @@ const RegisterComponent = () => { |
134 | 169 | } |
135 | 170 | @media (min-width: 768px) and (max-width: 992px) { |
136 | 171 | .footer{ |
137 | | - margin-bottom: 40px; |
| 172 | + margin-bottom: 40px !important; |
138 | 173 | } |
139 | 174 | } |
| 175 | + .box{ |
| 176 | + border:1px solid #e5e7eb !important; |
| 177 | + box-shadow:none !important; |
| 178 | + border-radius: 5px !important; |
| 179 | + } |
| 180 | + .sec-box button{ |
| 181 | + justify-content:center |
| 182 | + } |
140 | 183 | `} |
141 | 184 | </style> |
142 | 185 | </div> |
143 | 186 | </div> |
144 | 187 | </div> |
145 | | - {<RegisterComponent /> ? ( |
146 | | - <div |
147 | | - className="footer flex flex-wrap gap-3 md:gap-10 justify-between text-white" |
148 | | - style={{ marginTop: '13%', padding: '0 100px' }} |
149 | | - > |
150 | | - <Copyright /> |
151 | | - <Donations /> |
152 | | - </div> |
153 | | - ) : ( |
154 | | - <Footer /> |
155 | | - )} |
| 188 | + <MiniFooter /> |
156 | 189 | </div> |
157 | 190 | </> |
158 | 191 | ); |
|
0 commit comments