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 requestAddMessage = (sources) => { | |
const message$ = sources.ACTION | |
.filter((action) => action.type === 'ADD_MESSAGE') | |
.map((action) => action.payload); | |
const request$ = message$.map((payload) => { | |
return { | |
url: `/api/conversations/${payload.conversationId}/messages`, | |
category: 'addMessage', | |
method: 'POST', |
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
module Kokoro | |
class ErrorsController < ApplicationController | |
skip_before_action :guards_for_user | |
def not_found | |
Rails.logger.info(not_found_message) | |
path = env["ORIGINAL_FULLPATH"] | |
render( | |
template: "kokoro/errors/not_found", |
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
// Use this like <Icon name="bell" /> | |
/* eslint import/no-dynamic-require: "off" */ | |
import React from 'react'; | |
import PropTypes from 'prop-types'; | |
import styled, { css } from 'styled-components'; | |
import { ifProp } from 'styled-tools'; | |
import { sizes } from '../constants/'; | |
import colours from '../colours'; |
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 React from 'react'; | |
import PropTypes from 'prop-types'; | |
import styled from 'styled-components'; | |
import { baseTheme } from '../../../themes/src'; | |
import { sizes, userRoles } from '../constants'; | |
import Image from '../Image'; | |
import Icon from '../Icon'; | |
const getSize = ({ size }) => sizes.values[size]; |
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
// Wrapper pattern | |
const Wrapper = styled(Image)` | |
border-radius: 50%; | |
border: 2px solid ${colours.fuchsiaBlue}; | |
box-sizing: border-box; | |
height: ${avatarSize}rem; | |
width: ${avatarSize}rem; | |
`; | |
const Avatar = ({ src }) => ( |
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 React from 'react'; | |
import styled, { css } from 'styled-components'; | |
import { baseTheme, getFont } from '../../../themes/src/index'; | |
import { getFontSize } from './helpers'; | |
const styles = css` | |
font-family: ${getFont('bold')}; | |
font-weight: 500; | |
font-size: ${getFontSize}; | |
margin: 0; |
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 { div, h2, p } from '@cycle/dom'; | |
import xs from 'xstream'; | |
export function App(sources) { | |
const request$ = xs.of({ | |
url: 'http://localhost:3000/ping', | |
category: 'api', | |
// progress: true, | |
}); |
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
export function App (sources) { | |
const request$ = xs.periodic(3000) | |
.mapTo({ | |
url: 'http://localhost:3000', | |
category: 'api', | |
}); | |
const vtree$ = sources.HTTP.select('api') | |
.flatten() | |
.map(res => res.body) |
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
"vim.leader": "<space>", | |
"vim.otherModesKeyBindingsNonRecursive": [ | |
{ | |
"before": [ | |
"<leader>", | |
"g", | |
"w" | |
], | |
"commands": [ | |
{ |