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 { Module } from '../../core'; | |
import AppContainer from './AppContainer.jsx'; | |
const AppModule = new Module('App'); | |
AppModule | |
.setInitialState({ counter: 0 }) | |
// This will create Action Types (with normalized names) and Action Creators. | |
// The application container which is a wrapper around the redux store will | |
// compose all reducers of registered modules. The module name is used as key in the |
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 React, { Component } from 'react'; | |
import { BasePageContainer } from 'components'; | |
class LandingPage extends Component { | |
constructor(props) { | |
super(props); | |
this.state = { containerHeight: window.innerHeight }; | |
this.handleResize = this.handleResize.bind(this); | |
} |
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
export default () => next => action => { | |
const callAPI = action[CALL_API]; | |
if (typeof callAPI === 'undefined') { | |
return next(action); | |
} | |
const { url, types } = callAPI; | |
// const url = action.url; | |
// const types = action.types; | |
const [requestType, successType, failureType] = types; |
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
const myActionCreator = (actionType, payloadCreator) => { | |
return { | |
type: actionType, | |
payload: payloadCreator | |
}; | |
} | |
const myPayloadCreator = (input) => { | |
return API.makeApiCall(input); | |
} |
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
// Framework Imports | |
import 'babel-polyfill'; | |
import { Application } from 'reductor'; | |
import React from 'react'; | |
import { Route, IndexRedirect } from 'react-router'; | |
// Constants for Developmen purposes | |
const ENV = process.env.NODE_ENV || 'development'; | |
const DevTools = window.devToolsExtension ? window.devToolsExtension() : f => f; |
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 { Module } from 'reductor'; | |
import { | |
InitSessionAction, | |
InitSessionReducer, | |
InitSessionPayloadCreator, | |
} from './actions/InitSession'; | |
import { | |
UserLoginAction, |
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
function fizzbuzz(number) { | |
if( number%15 == 0 ) return "fizzbuzz"; | |
if( number%3 == 0 ) return "fizz"; | |
if( number%5 == 0 ) return "buzz"; | |
return number; | |
} | |
for (let i = 0; i <= 100; i++) { | |
return fizzbuzz(i); | |
} |
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
{code} | |
var now = new Date(); | |
var days = new Array('Sunday','Monday','Tuesday','Wednesday','Thursday','Friday','Saturday'); | |
var months = new Array('January','February','March','April','May','June','July','August','September','October','November','December'); | |
var date = ((now.getDate()<10) ? "0" : "")+ now.getDate(); |
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 React from 'react'; | |
import { useAddonState } from '@storybook/api'; | |
import { ADDON_ID, INITIAL_STATE, MOSSIO_THEME } from './shared'; | |
import { ThemeProvider } from 'emotion-theming'; | |
const withBranding = storyFn => { | |
const [{ brandPrimary, brandSecondary }] = useAddonState(ADDON_ID, INITIAL_STATE); | |
const branding = ancestorTheme => ({ | |
...ancestorTheme, |
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 React from 'react'; | |
import { useAddonState } from '@storybook/api'; | |
import { ADDON_ID, INITIAL_STATE, MOSSIO_THEME } from './shared'; | |
import { ThemeProvider } from 'emotion-theming'; | |
const Branding = ({ story }) => { | |
const [{ brandPrimary, brandSecondary }] = useAddonState(ADDON_ID, INITIAL_STATE); | |
const branding = ancestorTheme => ({ | |
...ancestorTheme, |
OlderNewer