aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/App.test.js9
-rw-r--r--src/Dashboard.js (renamed from src/App.js)0
-rw-r--r--src/index.html17
-rw-r--r--src/index.js4
-rw-r--r--src/popup.js29
5 files changed, 48 insertions, 11 deletions
diff --git a/src/App.test.js b/src/App.test.js
deleted file mode 100644
index a754b20..0000000
--- a/src/App.test.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import React from 'react';
-import ReactDOM from 'react-dom';
-import App from './App';
-
-it('renders without crashing', () => {
- const div = document.createElement('div');
- ReactDOM.render(<App />, div);
- ReactDOM.unmountComponentAtNode(div);
-});
diff --git a/src/App.js b/src/Dashboard.js
index bd17cec..bd17cec 100644
--- a/src/App.js
+++ b/src/Dashboard.js
diff --git a/src/index.html b/src/index.html
new file mode 100644
index 0000000..a51779c
--- /dev/null
+++ b/src/index.html
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8" />
+ <meta
+ name="viewport"
+ content="width=device-width, initial-scale=1, shrink-to-fit=no"
+ />
+ <meta name="theme-color" content="#000000" />
+ <link rel="stylesheet" href="/fonts/TypoPRO-FantasqueSansMono-Regular.css" />
+ <title>Chromicle</title>
+ </head>
+ <body>
+ <noscript>You need to enable JavaScript to run this app.</noscript>
+ <div id="root"></div>
+ </body>
+</html>
diff --git a/src/index.js b/src/index.js
index 955691f..adcb634 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,9 +1,9 @@
import React from 'react';
import ReactDOM from 'react-dom';
-import App from './App';
+import Dashboard from './Dashboard';
import * as serviceWorker from './serviceWorker';
-ReactDOM.render(<App />, document.getElementById('root'));
+ReactDOM.render(<Dashboard />, 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.
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();