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
const handleLogin = () => { | |
const user = new Parse.User(); | |
user.set('username', userName); | |
user.set('password', password); | |
user.logIn().then((user) => { | |
history.push('/') | |
}).catch(err => { | |
alert(err.message); |
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 "./Auth.css"; | |
import React, { useState } from "react"; | |
import Parse from "parse"; | |
import { useHistory } from 'react-router-dom' | |
const Auth = () => { | |
const [userName, setUserName] = useState(""); | |
const [password, setPassword] = useState(""); | |
const [isRegistering, setIsRegistering] = useState(false); |
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 from 'react'; | |
import ReactDOM from 'react-dom'; | |
import './index.css'; | |
import App from './App'; | |
import reportWebVitals from './reportWebVitals'; | |
import { initializeParse } from '@parse/react'; | |
initializeParse( | |
'YOUR_SERVER_URL', | |
'YOUR_APPLICATION_ID', |
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
*{ | |
padding: 0; | |
margin: 0; | |
} | |
header.app-header{ | |
background-color: #208AEC; | |
display: flex; | |
flex-direction: column; |
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 { useState } from "react"; | |
import Parse from 'parse'; | |
import './App.css' | |
Parse.initialize(process.env.PARSE_APP_ID,process.env.PARSE_JS_KEY); | |
Parse.serverURL = 'https://parseapi.back4app.com/'; | |
export default function Home() { | |
const [employeeName, setEmployeeName] = useState(""); | |
const [employeeEmail, setEmployeeEmail] = useState(""); |
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 from 'react'; | |
import ReactDOM from 'react-dom'; | |
import './index.css'; | |
import App from './App'; | |
import reportWebVitals from './reportWebVitals'; | |
import Parse from 'parse'; | |
Parse.initialize(process.env.REACT_APP_PARSE_APP_ID,process.env.REACT_APP_PARSE_JS_KEY); | |
Parse.serverURL = 'https://parseapi.back4app.com/'; |
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 from 'react'; | |
import ReactDOM from 'react-dom'; | |
import './index.css'; | |
import App from './App'; | |
import reportWebVitals from './reportWebVitals'; | |
import Parse from 'parse'; | |
Parse.initialize('YOUR_APPLICATION_ID_HERE','YOUR_JAVASCRIPT_KEY_HERE'); | |
Parse.serverURL = 'https://parseapi.back4app.com/'; |
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 Parse from 'parse'; | |
Parse.initialize(process.env.PARSE_APP_ID,process.env.PARSE_JS_KEY); | |
Parse.serverURL = 'https://parseapi.back4app.com/'; | |
export default Parse; |
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
REACT_APP_PARSE_APP_ID=YOUR_APPLICATION_ID_HERE | |
REACT_APP_PARSE_JS_KEY=YOUR_JAVASCRIPT_KEY_HERE |
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
//at services/parse.js | |
import Parse from 'parse'; | |
Parse.initialize("APP_ID","JS_KEY"); | |
Parse.serverURL = 'https://parseapi.back4app.com/'; |