9 lines
964 B
TypeScript
9 lines
964 B
TypeScript
import React from 'react';
|
|
import { renderToString } from 'react-dom/server';
|
|
import { EmailAnalyticsApp } from './components.js';
|
|
|
|
export default function (): string {
|
|
const html = renderToString(<EmailAnalyticsApp />);
|
|
return `<!DOCTYPE html><html><head><meta charset="UTF-8"><title>Email Analytics</title><style>* { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f5f5f5; } .app { max-width: 1200px; margin: 0 auto; padding: 20px; } .header { background: #0ea5e9; color: white; padding: 20px; border-radius: 8px; margin-bottom: 20px; } .metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 20px; } .metric-card { background: white; padding: 20px; border-radius: 8px; text-align: center; } .metric-value { font-size: 32px; font-weight: bold; color: #0ea5e9; }</style></head><body>${html}</body></html>`;
|
|
}
|