Spaces:
Paused
Paused
Download frontend/packages/shared/src/components/LoginCard.tsx from TeamError404/nexus: direct link, hf CLI and curl.
- Browser
- Download file 2.47 kB
-
https://huggingface.co/spaces/TeamError404/nexus/resolve/main/frontend/packages/shared/src/components/LoginCard.tsx
- Command line
-
hf download hf://spaces/TeamError404/nexus/frontend/packages/shared/src/components/LoginCard.tsx
-
curl -L -o LoginCard.tsx https://huggingface.co/spaces/TeamError404/nexus/resolve/main/frontend/packages/shared/src/components/LoginCard.tsx
2.47 kB
| import React, { useState } from 'react'; | |
| import { Button } from './Button'; | |
| import { Input } from './Input'; | |
| import styles from './LoginCard.module.css'; | |
| interface LoginCardProps { | |
| onLogin: (email: string, pass: string, portal?: 'customer' | 'internal') => void; | |
| loading?: boolean; | |
| portal?: 'customer' | 'internal'; | |
| error?: string | null; | |
| } | |
| export const LoginCard: React.FC<LoginCardProps> = ({ onLogin, loading, portal, error }) => { | |
| const [email, setEmail] = useState(''); | |
| const [password, setPassword] = useState(''); | |
| const handleSubmit = (e: React.FormEvent) => { | |
| e.preventDefault(); | |
| onLogin(email, password, portal); | |
| }; | |
| return ( | |
| <div className={styles.loginPage}> | |
| <div className={styles.card}> | |
| <div className={styles.header}> | |
| <div className={styles.brandLogo}> | |
| NEXUS | |
| </div> | |
| <p className={styles.subtitle}>Active Workspace Intelligence</p> | |
| </div> | |
| {error && ( | |
| <div className={styles.errorAlert}> | |
| <span style={{ fontSize: '18px' }}>⚠️</span> | |
| {error} | |
| </div> | |
| )} | |
| <form onSubmit={handleSubmit} className={styles.form}> | |
| <Input | |
| label="Professional Email" | |
| type="email" | |
| placeholder="name@company.com" | |
| value={email} | |
| onChange={(e) => setEmail(e.target.value)} | |
| required | |
| autoComplete="email" | |
| /> | |
| <Input | |
| label="Password" | |
| type="password" | |
| placeholder="••••••••" | |
| value={password} | |
| onChange={(e) => setPassword(e.target.value)} | |
| required | |
| autoComplete="current-password" | |
| /> | |
| <Button type="submit" loading={loading} className={styles.submitBtn}> | |
| Sign In to Workspace | |
| </Button> | |
| </form> | |
| <div className={styles.footer}> | |
| Having trouble?{' '} | |
| <span | |
| className={styles.link} | |
| onClick={() => { | |
| alert("Support Email: support@nexusai3sc.com\n\nPlease reach out to us if you need assistance."); | |
| }} | |
| > | |
| Contact Administrator | |
| </span> | |
| </div> | |
| <div className={styles.partnerBranding}> | |
| <div className={styles.line} /> | |
| POWERED BY 3SC | |
| <div className={styles.line} /> | |
| </div> | |
| </div> | |
| </div> | |
| ); | |
| }; | |