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
milestoneBtnMsg = | |
global.selectedCareplan -- Start with the careplan | |
|> Maybe.andThen .id -- Call .id on it if it's Just; return Nothing if it's Nothing or id is Nothing | |
|> Maybe.map MilestonesRoute -- Wrap it in a MilestonesRoute if we have a Just | |
|> Maybe.withDefault DoNothing -- If we have a Nothing, return DoNothing; otherwise, return the value in the Just | |
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
providerName = | |
case global.selectedProvider of | |
Nothing -> "(None)" | |
provider.name | |
-- Same as | |
providerName = Maybe.unwrap "(None)" .name global.selectedProvider |
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
const print = function() { require("console").dir(it); } |
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
.ql-blank { | |
@extend .d-none; | |
} |
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
.ql-editor { | |
font-family: "Museo Sans"; | |
h1 { | |
font-weight: 500; | |
font-size: 22pt; | |
color: #002F5F; | |
} | |
h2 { |
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 Promise from "bluebird"; | |
Promise.try(() => axios.get(CAREPLAN_URL)) | |
.tap(response => console.log(CAREPLAN_URL, response)) | |
.then(response => response.data) | |
.then(data => this.ds.cloneWithRows(data)) | |
.then(dataSource => this.setState({dataSource})) | |
.catch(e => console.error("Getting careplan failed", CAREPLAN_URL, e) | |
; | |
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
fib :: Int -> Int | |
fib 0 = 0 | |
fib 1 = 1 | |
fib 2 = 2 | |
fib i | i < 0 = error "argument to fib must be > 0" | |
fib i = fib (i-1) + fib (i-2) |
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
Show hidden characters
{ | |
"presets": [ | |
"react-native" | |
], | |
"plugins": [ | |
"transform-strict-mode", | |
[ "auto-import", | |
{ "declarations": [ | |
{ "default": "React", "path": "react" }, | |
{ "default": "_", "path": "lodash" }, |
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
onClick=>{ | |
() => this.setState({pageNumber:this.state.pageNumber+1}) | |
} |
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
// Initialize the loop variables | |
let currentLine = [] // ops making up the current line | |
const content = [] // Components that we will ultimately render | |
// Map parchment attributes to React styling object | |
const attrsToStyle = (attrs) => { | |
console.warn("Don't forget to implement styling!"); | |
return {}; | |
}; |