Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,7 @@ package-lock.json

npm-debug.log*
yarn-debug.log*
yarn-error.log*
yarn-error.log*

#firebase functions
/functions
3 changes: 2 additions & 1 deletion functions/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules/
node_modules/
index.js
3 changes: 0 additions & 3 deletions functions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@ const nodemailer = require('nodemailer');
const cors = require('cors')({ origin: true });
admin.initializeApp();

/**
* Here we're using Gmail to send
*/
let transporter = nodemailer.createTransport({
service: 'gmail',
auth: {
Expand Down
14 changes: 7 additions & 7 deletions src/app/initDb.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as firebase from 'firebase'
import { keys } from './keys'
// import { ENV, API_KEY, AUTH_DOMAIN, DB_URL, PROJECT_ID, STORAGE_BUCKET, MSG_SENDER_ID } from 'react-native-dotenv'
import { ENV, API_KEY, AUTH_DOMAIN, DB_URL, PROJECT_ID, STORAGE_BUCKET, MSG_SENDER_ID } from 'react-native-dotenv'

// console.log("TCL: ENV", ENV)

Expand All @@ -13,12 +13,12 @@ import { keys } from './keys'
// messagingSenderId: MSG_SENDER_ID
// }
const firebaseConfig = {
apiKey: keys.apiKey,
authDomain: keys.authDomain,
databaseURL: keys.databaseURL,
projectId: keys.projectId,
storageBucket: keys.storageBucket,
messagingSenderId: keys.messagingSenderId
apiKey: API_KEY || keys.apiKey,
authDomain: AUTH_DOMAIN || keys.authDomain,
databaseURL: DB_URL || keys.databaseURL,
projectId: PROJECT_ID || keys.projectId,
storageBucket: STORAGE_BUCKET || keys.storageBucket,
messagingSenderId: MSG_SENDER_ID || keys.messagingSenderId
}

export default () => {
Expand Down
1 change: 1 addition & 0 deletions src/views/help/HelpView.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ class HelpView extends Component {
const sendEmailFirebaseFunctionUrl = `https://us-central1-happrev.cloudfunctions.net/sendMail?name=${first} ${last}&email=${email}&phone=${phone}&content=${content}`
fetch(sendEmailFirebaseFunctionUrl)
.then((response) => {
console.log("TCL: HelpView -> SandMessage -> response", response)
this.setState({ success: true, modalVisible: true, loading: false })
}).catch((error) => {
this.setState({ modalVisible: true, loading: false })
Expand Down