This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {useState} from 'react'; | |
import {KeyboardAvoidingView, Platform, View} from 'react-native'; | |
import {Input, Button} from 'react-native-elements'; | |
import {styles} from '../../styles'; | |
export default function SignUp() { | |
const [data, setData] = useState({ | |
name: '', | |
email: '', | |
password: '', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function (api) { | |
api.cache(true); | |
return { | |
presets: ['babel-preset-expo'], | |
plugins: [ | |
["@babel/plugin-transform-flow-strip-types"], | |
["@babel/plugin-proposal-decorators", { "legacy": true }], | |
["@babel/plugin-proposal-class-properties", { "loose": true }], | |
["module-resolver", { | |
"alias": { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function attendCourse(studentId, courseId) { | |
const attendingRef = db.doc(`students/${studentId}/attending/${courseId}`); | |
const attendeeRef = db.doc(`courses/${courseId}/attendees/${studentId}`); | |
const batch = db.batch(); | |
batch.set(attendingRef, {}); | |
batch.set(attendeeRef, {}); | |
await batch.commit(); | |
} |