Commit 08afbaf0 by Tonk

add mock component

parent 24ca2c57
import React from 'react'; import React from 'react';
import app from '../firebase'; import app from '../firebase';
import { Row, Col, Container } from 'react-bootstrap';
import DataTable from '../components/DataTable';
// mock component
const Map = () => <Col>Map</Col>;
const CurrentChart = () => <Col>Current Chart</Col>;
const RevenueChart = () => <Col>Revenue chart</Col>;
const PeopleChart = () => <Col>People chart</Col>;
const RemoteChart = () => <Col>Remote chart</Col>;
const Home = () => { const Home = () => {
const signOut = async () => { const signOut = async () => {
await app.auth().signOut(); await app.auth().signOut();
}; };
return ( return (
<> <Container>
<h1>Home</h1> <h1>Home</h1>
<button onClick={signOut}>signOut</button> <button onClick={signOut}>signOut</button>
</> <Row>
<Map />
</Row>
<Row>
<CurrentChart />
<RevenueChart />
</Row>
<Row>
<PeopleChart />
<RemoteChart />
</Row>
<Row>
<DataTable />
</Row>
</Container>
); );
}; };
......
import React from 'react';
import { Col, Table } from 'react-bootstrap';
const DataTable = () => {
return (
<Col>
<Table striped bordered hover size="sm">
<thead>
<tr>
<th>Site</th>
<th>People</th>
<th>Revenue</th>
<th>Timestamp</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>Mark</td>
<td>Otto</td>
<td>@mdo</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
<tr>
<td>2</td>
<td>Jacob</td>
<td>Thornton</td>
<td>@fat</td>
</tr>
</tbody>
</Table>
</Col>
);
};
export default DataTable;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment