Skip to content
This repository has been archived by the owner on Sep 30, 2022. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sharils committed Mar 22, 2018
1 parent 29ec013 commit 787ca07
Show file tree
Hide file tree
Showing 6 changed files with 850 additions and 646 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"firebase": "^4.10.1",
"prop-types": "^15.6.0",
"ramda": "^0.25.0",
"react": "^16.2.0",
Expand Down
6 changes: 6 additions & 0 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-app.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-auth.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-database.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-firestore.js"></script>
<script src="https://www.gstatic.com/firebasejs/4.10.1/firebase-messaging.js"></script>
</head>
<body>
<noscript>
Expand Down
7 changes: 7 additions & 0 deletions src/firebase.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const firebase = global.firebase || {
initializeApp: () => ({})
// test doesn't call auth
};

export const { initializeApp } = firebase;
export const { auth } = firebase;
2 changes: 1 addition & 1 deletion src/init/firebaseApp.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as firebase from "firebase";
import { createAction, handleAction } from "redux-actions";
import { call, put, select } from "redux-saga/effects";
import * as firebase from "../firebase";

const SET = "dinnerplano/firebaseApp/SET";

Expand Down
2 changes: 1 addition & 1 deletion src/util/firebase.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import * as firebase from "firebase";
import * as firebase from "../firebase";

export const fbIsLoginError = e => {
if (e instanceof firebase.auth.Error) {
Expand Down
Loading

0 comments on commit 787ca07

Please sign in to comment.