|
1 | | -import Link from 'next/link' |
2 | | -import '../../theme/tailwind.scss' |
| 1 | +import Link from 'next/link'; |
| 2 | +import '../../theme/tailwind.scss'; |
3 | 3 |
|
4 | | -export const AfterLogin = () => { |
| 4 | +const OAuthButton = ({ href, iconSrc, bgColor, altText }) => { |
| 5 | + return ( |
| 6 | + <Link href={href} style={{ flex: 1 }}> |
| 7 | + <button style={{ ...buttonStyles, backgroundColor: bgColor }}> |
| 8 | + <img |
| 9 | + src={iconSrc} |
| 10 | + alt={altText} |
| 11 | + width="24" |
| 12 | + height="24" |
| 13 | + style={iconStyle} |
| 14 | + /> |
| 15 | + </button> |
| 16 | + </Link> |
| 17 | + ); |
| 18 | +}; |
| 19 | + |
| 20 | +export function OAuthButtons() { |
5 | 21 | return ( |
6 | | - <div className="mb-2 text-center"> |
7 | | - <a href="/api/users/oauth/google"> |
8 | | - <button |
9 | | - className="btn btn--icon-style-without-border btn--size-large btn--withoutPopup btn--style-primary btn--withoutPopup" |
10 | | - style={{ width: "100%" }} |
11 | | - > |
12 | | - Continue With Google |
13 | | - </button> |
14 | | - </a> |
15 | | - <a href="/api/users/oauth/linkedin"> |
16 | | - <button |
17 | | - className="btn btn--icon-style-without-border btn--size-large btn--withoutPopup btn--style-primary btn--withoutPopup" |
18 | | - style={{ width: "100%" }} |
19 | | - > |
20 | | - Continue With LinkedIn |
21 | | - </button> |
22 | | - </a> |
23 | | - Welcome to the admin panel of cuHacking's <span className="text-yellow-400">2025</span> <span className="text-orange-400">Platform</span>, built with <Link className="text-primary" href="https://docs.cuhacking.ca/tech-stack" target="_blank">Axiom</Link>, our very own in-house meta-framework. |
24 | | - <p> |
25 | | - This project is a work in progress :) |
26 | | - </p> |
27 | | - </div> |
28 | | - ) |
| 22 | + <section style={containerStyle}> |
| 23 | + <OAuthButton |
| 24 | + href="/api/users/oauth/linkedin" |
| 25 | + iconSrc="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/linkedin/linkedin-original.svg" |
| 26 | + bgColor="#0077B5" |
| 27 | + altText="LinkedIn Login" |
| 28 | + /> |
| 29 | + <OAuthButton |
| 30 | + href="/api/users/oauth/google" |
| 31 | + iconSrc="https://cdn.jsdelivr.net/gh/devicons/devicon@latest/icons/google/google-original.svg" |
| 32 | + bgColor="#000" |
| 33 | + altText="Google Login" |
| 34 | + /> |
| 35 | + </section> |
| 36 | + ); |
29 | 37 | } |
| 38 | + |
| 39 | +export const AfterLogin = () => { |
| 40 | + return ( |
| 41 | + <> |
| 42 | + <OAuthButtons /> |
| 43 | + <section> |
| 44 | + Welcome to the admin panel of cuHacking's{' '} |
| 45 | + <span className="text-yellow-400">2025</span>{' '} |
| 46 | + <span className="text-orange-400">Platform</span>, built with{' '} |
| 47 | + <Link |
| 48 | + className="text-primary" |
| 49 | + href="https://docs.cuhacking.ca/tech-stack" |
| 50 | + target="_blank" |
| 51 | + > |
| 52 | + Axiom |
| 53 | + </Link> |
| 54 | + , our very own in-house meta-framework. |
| 55 | + <p>This project is a work in progress :)</p> |
| 56 | + </section> |
| 57 | + </> |
| 58 | + ); |
| 59 | +}; |
| 60 | + |
| 61 | +const containerStyle = { |
| 62 | + display: 'flex', |
| 63 | + flexDirection: 'column', |
| 64 | + gap: '15px', |
| 65 | + width: '100%', |
| 66 | + marginBottom: '30px' |
| 67 | +}; |
| 68 | + |
| 69 | +const buttonStyles = { |
| 70 | + width: '100%', |
| 71 | + display: 'flex', |
| 72 | + alignItems: 'center', |
| 73 | + justifyContent: 'center', |
| 74 | + border: 'none', |
| 75 | + padding: '12px 0', |
| 76 | + cursor: 'pointer', |
| 77 | + color: 'white', |
| 78 | + fontSize: '16px', |
| 79 | + fontWeight: 'bold', |
| 80 | + borderRadius: '5px', |
| 81 | +}; |
| 82 | + |
| 83 | +const iconStyle = { |
| 84 | + marginRight: '8px', |
| 85 | +}; |
0 commit comments