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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Center Content Vertically in the Remaining Screen Space</title> | |
<style> | |
html, |
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
/* | |
* --- CSS Init --- | |
* This CSS Init is inspired by | |
* Josh Comeau's global styles: | |
* https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles | |
* and pieces of Andy Bell's Modern CSS Reset: | |
* https://piccalil.li/blog/a-modern-css-reset/ | |
*/ | |
/* Use a more-intuitive box-sizing model. */ |
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
# This is Git's per-user configuration file. | |
[core] | |
repositoryformatversion = 0 | |
filemode = true | |
bare = false | |
logallrefupdates = true | |
editor = vim | |
[user] | |
name = [YOUR_NAME] | |
email = [YOUR_EMAIL] |
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
# If you come from bash you might have to change your $PATH. | |
# export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/claire/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/ohmyzsh/ohmyzsh/wiki/Themes | |
ZSH_THEME="spaceship" | |
# Set list of themes to pick from when loading at random |
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
require('dotenv').config(); | |
const express = require('express'); | |
const app = express(); | |
const cors = require('cors'); | |
const bodyParser = require('body-parser'); | |
const { Storage } = require('@google-cloud/storage'); | |
const multer = require('multer'); | |
const port = process.env.API_PORT || 8080; | |
app.use(bodyParser.json()); |
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, { useEffect } from "react"; | |
import { connect } from "react-redux"; | |
export default ChildComponent => { | |
const ComposedComponent = props => { | |
useEffect(() => { | |
if (props.auth.isLoaded && props.auth.isEmpty) return props.history.push("/"); | |
}, [props.auth, props.history]); | |
return <ChildComponent {...props} />; |
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 { connect } from "react-redux"; | |
import Home from "./Home"; | |
import Login from "./Login"; | |
import Loader from "./Loader"; | |
const Main = ({ auth }) => { | |
return ( | |
<div> | |
{!auth.isLoaded ? <Loader /> : !auth.isEmpty ? <Home /> : <Login />} |
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 { SIGNIN_SUCCESS, SIGNIN_ERROR } from "./actionTypes"; | |
import firebase from "../../services/firebase"; | |
// Signing in with Firebase | |
export const signin = (email, password, callback) => async dispatch => { | |
try { | |
firebase | |
.auth() | |
.signInWithEmailAndPassword(email, password) | |
.then(() => { |
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 { SIGNUP_SUCCESS, SIGNUP_ERROR } from "./actionTypes"; | |
import firebase from "../../services/firebase"; | |
// Signing up with Firebase | |
export const signup = (email, password) => async dispatch => { | |
try { | |
firebase | |
.auth() | |
.createUserWithEmailAndPassword(email, password) | |
.then(dataBeforeEmail => { |
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 { BrowserRouter as Router } from "react-router-dom"; | |
import "./css/index.css"; | |
import App from "./components/App"; | |
// SETTING UP REDUX STORE | |
import { Provider } from "react-redux"; | |
import { createStore, applyMiddleware, compose } from "redux"; | |
import reduxThunk from "redux-thunk"; |
NewerOlder