44 lines
1.0 KiB
TypeScript
44 lines
1.0 KiB
TypeScript
import Button from '../../components/Button/Button';
|
|
import Card from '../../components/Card/Card';
|
|
import './HomePage.css';
|
|
|
|
interface HomePageProps {
|
|
dspCount: number;
|
|
connectedCount: number;
|
|
onAddDSP: () => void;
|
|
}
|
|
|
|
function HomePage({ dspCount, connectedCount, onAddDSP }: HomePageProps) {
|
|
return (
|
|
<div className="home-page">
|
|
<Card>
|
|
<div className="card-content">
|
|
<dl className="specs">
|
|
<div className="spec">
|
|
<dt>Connected</dt>
|
|
<dd>
|
|
{connectedCount} DSP{connectedCount > 1 ? 's' : ''}
|
|
</dd>
|
|
</div>
|
|
|
|
<div className="spec">
|
|
<dt>Devices</dt>
|
|
<dd>
|
|
{dspCount} DSP{dspCount > 1 ? 's' : ''}
|
|
</dd>
|
|
</div>
|
|
</dl>
|
|
|
|
<div className="home-panel-actions">
|
|
<Button variant="primary" onClick={onAddDSP}>
|
|
Add a DSP
|
|
</Button>
|
|
</div>
|
|
</div>
|
|
</Card>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
export default HomePage;
|