aboutsummaryrefslogtreecommitdiff
path: root/src/popup.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/popup.js')
-rw-r--r--src/popup.js29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/popup.js b/src/popup.js
new file mode 100644
index 0000000..c4daf81
--- /dev/null
+++ b/src/popup.js
@@ -0,0 +1,29 @@
+import React from 'react';
+import ReactDOM from 'react-dom';
+import * as serviceWorker from './serviceWorker';
+import { MuiThemeProvider } from '@material-ui/core/styles';
+import Button from '@material-ui/core/Button';
+import theme from './theme';
+
+function openOptions() {
+ chrome.tabs.create({ url: "index.html" });
+}
+
+class Popup extends React.Component {
+ render() {
+ return (
+ <MuiThemeProvider theme={theme}>
+ <span>No data available.
+ <Button variant="contained" color="primary" onClick={openOptions}>Go to Dashboard</Button>
+ </span>
+ </MuiThemeProvider>
+ );
+ }
+}
+
+ReactDOM.render(<Popup />, document.getElementById('root'));
+
+// If you want your app to work offline and load faster, you can change
+// unregister() to register() below. Note this comes with some pitfalls.
+// Learn more about service workers: http://bit.ly/CRA-PWA
+serviceWorker.unregister();