This file contains hidden or 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 {firebaseRef} from '../firebase/index'; | |
| //export async action to start add table | |
| export var startAddTable = (table) => { | |
| return(dispatch, getState) => { | |
| var propId = getState().property.key; | |
| //get propid | |
| var tableFanOut = {}; | |
| var tableKey = firebaseRef.child('tables').push().key; | |
| tableFanOut[`/tables/${tableKey}`] = table; | |
| tableFanOut[`/property-tables/${propId}/${tableKey}`] = tableKey; |
This file contains hidden or 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
| remote: Total precache size is about 3.73 MB for 29 resources. | |
| remote: Hash: fa3175ac800b11e030e2 | |
| remote: Version: webpack 3.4.1 | |
| remote: Time: 58465ms | |
| remote: Asset Size Chunks Chunk Names | |
| remote: 13.fa3175ac800b.bundle.js 2.29 kB 13 [emitted] | |
| remote: 1b35dcaaed2aee19d08d6167bda5f588.png 8.89 kB [emitted] | |
| remote: 1.fa3175ac800b.bundle.js 1.64 kB 1 [emitted] | |
| remote: 2.fa3175ac800b.bundle.js 496 kB 2 [emitted] [big] | |
| remote: 3.fa3175ac800b.bundle.js 530 kB 3 [emitted] [big] |
This file contains hidden or 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 firebase, {firebaseRef, googleAuthProvider, storageRef} from '../firebase'; | |
| import {reset} from 'redux-form'; | |
| import { addProperty } from 'propertyActions'; | |
| import {collectUserProperties} from 'userPropertiesActions'; | |
| //add login action | |
| export var login = (user) => { | |
| return { | |
| type: 'LOGIN', | |
| user | |
| }; |
This file contains hidden or 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 configureMockStore from 'redux-mock-store' | |
| import expect from 'expect' | |
| import thunk from 'redux-thunk' | |
| import firebase,{firebaseRef} from 'src/firebase/index' | |
| import * as actions from 'authActions' | |
| import shortid from 'shortid' | |
| //use this to mock a store |
This file contains hidden or 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 {injectGlobal} from 'styled-components'; | |
| import Roboto from '../assets/Roboto-Black.ttf'; | |
| export default function() { | |
| injectGlobal` | |
| @font-face { | |
| font-family: 'Roboto'; | |
| src: url(${Roboto}); | |
| } | |
| body { | |
| font-family: Roboto; |
This file contains hidden or 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
| user1 = %{name: "Zacck", account_type: "Free"} | |
| user2 = %{name: "Carla", account_type: "Paid"} | |
| def validate(user) do | |
| if user.account_type == "Paid" do | |
| true | |
| else | |
| false | |
| end | |
| end |
This file contains hidden or 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
| def validate(user) do | |
| validate(user, user.account_type) | |
| end | |
| def validate(user, "Free") do | |
| allowgoldcoins(user.name, false) | |
| false | |
| end | |
| def validate(user, "Paid") do |
This file contains hidden or 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
| defmodule Math do | |
| @moduledoc """ | |
| Bogus implementation of trivial calculations for | |
| testing examples | |
| """ | |
| @doc ~S""" | |
| Does some trivial calculations | |
This file contains hidden or 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
| defmodule MathTest do | |
| use ExUnit.Case, async: true | |
| doctest Math | |
| end |
This file contains hidden or 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
| defmodule Application.Profile do | |
| alias Application.Person | |
| @doc ~S""" | |
| This prints the persons profile | |
| """ | |
| def log(%Person{} = person) do | |
| IO.puts person | |
| end | |
| end |