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 {Action, ActionCreator, Dispatch} from 'redux'; | |
import {ThunkAction} from 'redux-thunk'; | |
// Redux action | |
const reduxAction: ActionCreator<Action> = (text: string) => { | |
return { | |
type: SET_TEXT, | |
text | |
}; | |
}; |
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
//Use $.cookie('quickbrowse-debug', true, {expires: 7, path: '/'}) to set. | |
// ... and $.cookie('quickbrowse-debug', null) to delete. | |
var qbConsole; | |
if(!$.cookie('quickbrowse-debug')) { | |
qbConsole = {}; | |
qbConsole.log = function(){}; | |
} else { | |
qbConsole = console; | |
} |
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
<script type="text/template" id="something-tmpl"> | |
<% for (var index = 0; index < items.length; index++) { %> | |
<% var item = items[index]; %> | |
<p><strong><%= item.username %></strong></p> | |
<% if (item.age) { %> <p>Age: <%= item.age %></p> <% } %> | |
<% if (item.sex) { %> <p>Sex: <%= item.sex %></p> <% } %> | |
<% if (item.location) { %> <p>Location: <%= item.location %></p> <% } %> | |
<% } %> |