diff options
| author | Ryan Mehri <[email protected]> | 2020-05-25 23:09:20 -0600 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-05-25 23:09:20 -0600 |
| commit | a104b512efb599d83c046dbea95379669b87bb8c (patch) | |
| tree | 403e10b4ec1ebc78d7e6f16d1f50f299c973e242 /frontend | |
| parent | Merge pull request #32 from jackyzha0/latex-renderer (diff) | |
| parent | update makefile and readme (diff) | |
| download | ctrl-v-a104b512efb599d83c046dbea95379669b87bb8c.tar.xz ctrl-v-a104b512efb599d83c046dbea95379669b87bb8c.zip | |
Merge pull request #33 from jackyzha0/firebase
deploy
Diffstat (limited to 'frontend')
| -rw-r--r-- | frontend/.firebaserc | 5 | ||||
| -rw-r--r-- | frontend/.gitignore | 65 | ||||
| -rw-r--r-- | frontend/firebase.json | 16 | ||||
| -rw-r--r-- | frontend/src/components/renderers/Latex.js | 2 | ||||
| -rw-r--r-- | frontend/src/helpers/httpHelper.js | 4 |
5 files changed, 89 insertions, 3 deletions
diff --git a/frontend/.firebaserc b/frontend/.firebaserc new file mode 100644 index 0000000..ae027e9 --- /dev/null +++ b/frontend/.firebaserc @@ -0,0 +1,5 @@ +{ + "projects": { + "default": "ctrl-v-a8efd" + } +} diff --git a/frontend/.gitignore b/frontend/.gitignore new file mode 100644 index 0000000..f626852 --- /dev/null +++ b/frontend/.gitignore @@ -0,0 +1,65 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +firebase-debug.log* + +# Firebase cache +.firebase/ + +# Firebase config + +# Uncomment this if you'd like others to create their own Firebase project. +# For a team working on the same Firebase project(s), it is recommended to leave +# it commented so all members can deploy to the same project(s) in .firebaserc. +# .firebaserc + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Bower dependency directory (https://bower.io/) +bower_components + +# node-waf configuration +.lock-wscript + +# Compiled binary addons (http://nodejs.org/api/addons.html) +build/Release + +# Dependency directories +node_modules/ + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variables file +.env diff --git a/frontend/firebase.json b/frontend/firebase.json new file mode 100644 index 0000000..340ed5b --- /dev/null +++ b/frontend/firebase.json @@ -0,0 +1,16 @@ +{ + "hosting": { + "public": "build", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ], + "rewrites": [ + { + "source": "**", + "destination": "/index.html" + } + ] + } +} diff --git a/frontend/src/components/renderers/Latex.js b/frontend/src/components/renderers/Latex.js index 6915f75..dcb9ea3 100644 --- a/frontend/src/components/renderers/Latex.js +++ b/frontend/src/components/renderers/Latex.js @@ -20,8 +20,6 @@ class Latex extends React.Component { } }).flat() - console.log(els) - // if <=1 lines, just render block if (els.length <= 1) { return ( diff --git a/frontend/src/helpers/httpHelper.js b/frontend/src/helpers/httpHelper.js index 28704f5..0c7c295 100644 --- a/frontend/src/helpers/httpHelper.js +++ b/frontend/src/helpers/httpHelper.js @@ -1,6 +1,8 @@ import axios from 'axios'; -const base = `http://localhost:8080/api` +// uncomment for local dev +// const base = `http://localhost:8080/api` +const base = `https://api.ctrl-v.app/api` export function FetchPaste(hash) { const serverURL = `${base}/${hash}` |