EverydayTech Platform - Developer Reference
Complete Source Code Documentation - All Applications
Loading...
Searching...
No Matches
ExchangeCard.jsx
Go to the documentation of this file.
1import React from 'react';
2
3function ExchangeCard({ email, status, loading, onLogin, tenantEmail }) {
4 return (
5 <div className="config-card">
6 <h3>Exchange / Office 365 Email Integration</h3>
7 <p>Connect your tenant's email account to enable ticketing and customer responses via Exchange/Office 365.</p>
8 <div className="form-row">
9 <input
10 type="email"
11 placeholder="Tenant email address"
12 value={email}
13 onChange={e => onLogin.setEmail(e.target.value)}
14 style={{ width: '80%' }}
15 />
16 <button onClick={onLogin.login} disabled={!email || loading} className="btn-primary">
17 {loading ? 'Connecting...' : 'Connect'}
18 </button>
19 </div>
20 {status && (
21 <div className={`status-message ${status.startsWith('Connected') ? 'success' : 'error'}`}>
22 {status}
23 </div>
24 )}
25 {tenantEmail && (
26 <div className="current-config">
27 <b>Current tenant email:</b> {tenantEmail}
28 </div>
29 )}
30 </div>
31 );
32}
33
34export default ExchangeCard;