add support for markdown text files

This commit is contained in:
Lachlan Kermode
2019-01-03 13:04:55 +00:00
parent b60d3053c7
commit 5552aa563f
7 changed files with 74 additions and 24 deletions

View File

@@ -72,3 +72,18 @@ export function formatterWithYear(datetime) {
export function formatter(datetime) {
return d3.timeFormat("%d %b, %H:%M")(datetime);
}
/**
* Debugging function: put in place of a mapStateToProps function to
* view that source modal by default
*/
function injectSource(id) {
return state => ({
...state,
app: {
...state.app,
source: state.domain.sources[id]
}
})
}