├── .babelrc
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .prettierrc
├── .snyk
├── README.md
├── config
├── env.js
├── paths.js
├── webpack.config.common.js
├── webpack.config.dev.js
├── webpack.config.prod.js
├── webpack.config.webstorm.js
└── webpackDevServer.config.js
├── netlify.toml
├── package-lock.json
├── package.json
├── public
├── _redirects
├── favicon.ico
├── fonts
│ ├── SFCompactText-Bold.otf
│ ├── SFCompactText-Heavy.otf
│ ├── SFCompactText-Light.otf
│ ├── SFCompactText-Light.woff
│ ├── SFCompactText-Medium.otf
│ ├── SFCompactText-Medium.woff
│ ├── SFCompactText-Regular.otf
│ ├── SFCompactText-Regular.woff
│ └── SFCompactText-Semibold.otf
├── images
│ ├── opengraph.png
│ ├── synthetix-logo.svg
│ └── synthetix-logo_black.svg
├── index.html
└── manifest.json
├── scripts
├── build.js
└── start.js
└── src
├── App.js
├── actions
├── actionTypes.js
├── binaryOptions.js
├── charts.js
├── exchange.js
├── markets.js
├── network.js
└── theme.js
├── components
├── AreaChart
│ └── index.js
├── HorizontalBarChart
│ ├── index.js
│ └── styles.sass
├── PieChart
│ ├── index.js
│ └── styles.sass
├── SingleStatBox
│ └── index.js
├── Tooltip
│ └── index.js
└── TopNavBar
│ └── index.js
├── config
├── api.js
├── helpers.js
├── sagas.js
├── store.js
└── theme.js
├── index.js
├── pages
└── Dashboard
│ └── index.js
├── reducers
├── binaryOptions.js
├── charts.js
├── exchange.js
├── index.js
├── markets.js
├── network.js
└── theme.js
├── resources
├── favicon.ico
└── havven-logo.svg
├── styling
├── _chart-section.sass
├── _chart-tooltip.sass
├── _footer.sass
├── _nav.sass
├── _single-stat.sass
├── _variables.sass
├── bulma
│ ├── bulma.css
│ ├── bulma.css.map
│ ├── bulma.sass
│ └── sass
│ │ ├── base
│ │ ├── _all.sass
│ │ ├── generic.sass
│ │ ├── helpers.sass
│ │ └── minireset.sass
│ │ ├── components
│ │ ├── _all.sass
│ │ ├── breadcrumb.sass
│ │ ├── card.sass
│ │ ├── dropdown.sass
│ │ ├── level.sass
│ │ ├── media.sass
│ │ ├── menu.sass
│ │ ├── message.sass
│ │ ├── modal.sass
│ │ ├── navbar.sass
│ │ ├── pagination.sass
│ │ ├── panel.sass
│ │ └── tabs.sass
│ │ ├── elements
│ │ ├── _all.sass
│ │ ├── box.sass
│ │ ├── button.sass
│ │ ├── container.sass
│ │ ├── content.sass
│ │ ├── form.sass
│ │ ├── icon.sass
│ │ ├── image.sass
│ │ ├── notification.sass
│ │ ├── other.sass
│ │ ├── progress.sass
│ │ ├── table.sass
│ │ ├── tag.sass
│ │ └── title.sass
│ │ ├── grid
│ │ ├── _all.sass
│ │ ├── columns.sass
│ │ └── tiles.sass
│ │ ├── layout
│ │ ├── _all.sass
│ │ ├── footer.sass
│ │ ├── hero.sass
│ │ └── section.sass
│ │ └── utilities
│ │ ├── _all.sass
│ │ ├── animations.sass
│ │ ├── controls.sass
│ │ ├── derived-variables.sass
│ │ ├── functions.sass
│ │ ├── initial-variables.sass
│ │ └── mixins.sass
├── custom.css
├── custom.css.map
├── custom.sass
├── dark.css
├── dark.css.map
├── dark.sass
├── light.css
├── light.css.map
├── light.sass
├── main.css
├── main.css.map
└── main.sass
└── utils.js
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "@babel/preset-flow",
4 | [
5 | "@babel/preset-env",
6 | {
7 | "modules": false,
8 | "useBuiltIns": "entry",
9 | "targets": {
10 | "browsers": [
11 | "last 2 versions",
12 | "ie >= 11",
13 | "safari >= 10"
14 | ]
15 | }
16 | }
17 | ],
18 | "@babel/react"
19 | ],
20 | "plugins": [
21 | [
22 | "@babel/plugin-proposal-decorators",
23 | {
24 | "legacy": true
25 | }
26 | ],
27 | [
28 | "@babel/plugin-proposal-class-properties",
29 | {
30 | "loose": true
31 | }
32 | ],
33 | "@babel/plugin-proposal-export-default-from",
34 | "@babel/plugin-transform-async-to-generator",
35 | "@babel/plugin-proposal-nullish-coalescing-operator",
36 | "@babel/plugin-proposal-optional-chaining",
37 | "@babel/plugin-syntax-dynamic-import",
38 | "@babel/plugin-syntax-import-meta",
39 | "@babel/plugin-proposal-json-strings",
40 | "@babel/plugin-proposal-function-sent",
41 | "@babel/plugin-proposal-export-namespace-from",
42 | "@babel/plugin-proposal-numeric-separator",
43 | "@babel/plugin-proposal-throw-expressions"
44 | ],
45 | "env": {
46 | "development": {
47 | "plugins": [
48 | "react-hot-loader/babel"
49 | ]
50 | },
51 | "production": {
52 | "plugins": [
53 | "transform-react-remove-prop-types"
54 | ]
55 | }
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/.eslintignore:
--------------------------------------------------------------------------------
1 | build
2 |
--------------------------------------------------------------------------------
/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | extends: ['last', 'plugin:import/errors'],
3 |
4 | env: {
5 | es6: true,
6 | jest: true,
7 | browser: true,
8 | node: true,
9 | },
10 |
11 | plugins: ['react'],
12 |
13 | rules: {
14 | 'import/no-unresolved': 'error',
15 | 'no-console': 'off',
16 | 'prettier/prettier': 'off',
17 | 'prefer-arrow-callback': 'error',
18 | 'space-before-blocks': ['error', 'always'],
19 | 'prefer-const': 'error',
20 | 'no-shadow': 'error',
21 | 'indent': ['error', 'tab'],
22 | 'react/jsx-no-undef': 2,
23 | 'react/jsx-uses-react': 2,
24 | 'react/jsx-uses-vars': 2,
25 | },
26 | };
27 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See https://help.github.com/ignore-files/ for more about ignoring files.
2 |
3 | # dependencies
4 | /node_modules
5 |
6 | # production
7 | build
8 |
9 | # misc
10 | .DS_Store
11 | .idea
12 |
13 | npm-debug.log*
14 | yarn-debug.log*
15 | yarn-error.log*
16 |
--------------------------------------------------------------------------------
/.prettierrc:
--------------------------------------------------------------------------------
1 | {
2 | "useTabs": true,
3 | "printWidth": 100,
4 | "semi": true,
5 | "singleQuote": true,
6 | "trailingComma": "es5",
7 | "tabWidth": 2
8 | }
9 |
--------------------------------------------------------------------------------
/.snyk:
--------------------------------------------------------------------------------
1 | # Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
2 | version: v1.13.3
3 | ignore: {}
4 | # patches apply the minimum changes required to fix a vulnerability
5 | patch:
6 | SNYK-JS-AXIOS-174505:
7 | - axios:
8 | patched: '2019-05-13T00:49:27.298Z'
9 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | [](https://app.netlify.com/sites/synthetix-dashboard/deploys)
2 |
3 | # Synthetix Dashboard website
4 |
5 | This site uses Netlify for the hosting.
6 |
7 | ## Branches
8 |
9 | The `staging` branch is the dev version which automatically deploys to https://staging.dashboard.synthetix.io.
10 | The `master` branch automatically deploys to https://dashboard.synthetix.io.
11 |
12 | ## Install
13 |
14 | ```sh
15 | npm i
16 | ```
17 |
18 | ## Format
19 |
20 | ```sh
21 | npm run format
22 | ```
23 |
24 | ## Run
25 |
26 | ```sh
27 | npm start
28 | ```
29 |
30 | ## Build the Static Site
31 |
32 | ```sh
33 | npm build
34 | ```
35 |
36 | ## Analyze package modules
37 |
38 | ```sh
39 | npm build:analyze
40 | ```
41 |
--------------------------------------------------------------------------------
/config/env.js:
--------------------------------------------------------------------------------
1 | const fs = require("fs");
2 | const path = require("path");
3 |
4 | const NODE_ENV = process.env.NODE_ENV;
5 |
6 | if (!NODE_ENV) {
7 | throw new Error(
8 | "The NODE_ENV environment variable is required but was not specified."
9 | );
10 | }
11 |
12 | // We support resolving modules according to `NODE_PATH`.
13 | // This lets you use absolute paths in imports inside large monorepos:
14 | // https://github.com/facebookincubator/create-react-app/issues/253.
15 | // It works similar to `NODE_PATH` in Node itself:
16 | // https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders
17 | // Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored.
18 | // Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims.
19 | // https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421
20 | // We also resolve them to make sure all tools using them work consistently.
21 | const appDirectory = fs.realpathSync(process.cwd());
22 | process.env.NODE_PATH = (process.env.NODE_PATH || "")
23 | .split(path.delimiter)
24 | .filter(folder => folder && !path.isAbsolute(folder))
25 | .map(folder => path.resolve(appDirectory, folder))
26 | .join(path.delimiter);
27 |
28 | function getClientEnvironment(publicUrl) {
29 | const raw = Object.keys(process.env).reduce(
30 | (env, key) => {
31 | env[key] = process.env[key]; // eslint-disable-line no-param-reassign
32 | return env;
33 | },
34 | {
35 | // Useful for determining whether we’re running in production mode.
36 | // Most importantly, it switches React into the correct mode.
37 | NODE_ENV: process.env.NODE_ENV || "development",
38 | // Useful for resolving the correct path to static assets in `public`.
39 | // For example,
.
40 | // This should only be used as an escape hatch. Normally you would put
41 | // images into the `src` and `import` them in code to get their paths.
42 | PUBLIC_URL: publicUrl
43 | }
44 | );
45 | // Stringify all values so we can feed into Webpack DefinePlugin
46 | const stringified = {
47 | "process.env": Object.keys(raw).reduce((env, key) => {
48 | env[key] = JSON.stringify(raw[key]); // eslint-disable-line no-param-reassign
49 | return env;
50 | }, {})
51 | };
52 |
53 | return { raw, stringified };
54 | }
55 |
56 | module.exports = getClientEnvironment;
57 |
--------------------------------------------------------------------------------
/config/paths.js:
--------------------------------------------------------------------------------
1 | const path = require("path");
2 | const fs = require("fs");
3 | const url = require("url");
4 |
5 | // Make sure any symlinks in the project folder are resolved:
6 | // https://github.com/facebookincubator/create-react-app/issues/637
7 | const appDirectory = fs.realpathSync(process.cwd());
8 | const resolveApp = relativePath => path.resolve(appDirectory, relativePath);
9 |
10 | const envPublicUrl = process.env.PUBLIC_URL;
11 |
12 | function ensureSlash(needlePath, needsSlash) {
13 | const hasSlash = needlePath.endsWith("/");
14 | if (hasSlash && !needsSlash) {
15 | return needlePath.substr(needlePath, needlePath.length - 1);
16 | } else if (!hasSlash && needsSlash) {
17 | return `${needlePath}/`;
18 | }
19 | return needlePath;
20 | }
21 |
22 | const getPublicUrl = appPackageJson =>
23 | envPublicUrl || require(appPackageJson).homepage;
24 |
25 | // We use `PUBLIC_URL` environment variable or "homepage" field to infer
26 | // "public path" at which the app is served.
27 | // Webpack needs to know it to put the right