diff --git a/ROADMAP.md b/ROADMAP.md index 733dcf63..a2708f54 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -16,7 +16,7 @@ - Create Tables (Primary collections) ✅ - Create columns (fields) ✅ -- Create rows(documents) +- Create rows(documents) ✅ - Edit cells ✅ - Authenicate ✅ - Delete rows ✅ diff --git a/src/App.tsx b/src/App.tsx index e69adeae..ef73644c 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,6 +4,7 @@ import { createMuiTheme } from "@material-ui/core"; import AuthView from "./views/AuthView"; import TableView from "./views/TableView"; +import TablesView from "./views/TablesView"; import { BrowserRouter as Router, Route } from "react-router-dom"; import { AuthProvider } from "./AuthProvider"; @@ -26,6 +27,7 @@ const App: React.FC = () => {
+
diff --git a/src/views/TablesView.tsx b/src/views/TablesView.tsx new file mode 100644 index 00000000..b6ff3790 --- /dev/null +++ b/src/views/TablesView.tsx @@ -0,0 +1,67 @@ +import React from "react"; +import useSettings from "../hooks/useSettings"; +import { makeStyles } from "@material-ui/core/styles"; +import Card from "@material-ui/core/Card"; +import CardActions from "@material-ui/core/CardActions"; +import CardContent from "@material-ui/core/CardContent"; +import Button from "@material-ui/core/Button"; +import Typography from "@material-ui/core/Typography"; +import Grid from "@material-ui/core/Grid"; +import useRouter from "../hooks/useRouter"; + +const useStyles = makeStyles({ + card: { + minWidth: 275 + }, + bullet: { + display: "inline-block", + margin: "0 2px", + transform: "scale(0.8)" + }, + title: { + fontSize: 14 + }, + pos: { + marginBottom: 12 + } +}); + +const TablesView = (props: any) => { + const [settings, createTable] = useSettings(); + const tables = settings.tables; + const classes = useStyles(); + const router = useRouter(); + + return ( + + {tables + ? tables.map((table: any) => ( + + + + {table.name} + + + primary + + + Table summery use + + + + + + + )) + : "TODO: card skeleton"} + + ); +}; +export default TablesView;