This repository has been archived by the owner on Apr 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #66 from RyanCCollins/feat_rc_flow_configuration
Feat rc flow configuration
- Loading branch information
Showing
112 changed files
with
26,758 additions
and
9,683 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[ignore] | ||
.*/node_modules/.* | ||
|
||
[include] | ||
|
||
[libs] | ||
config/flow-typed/npm | ||
|
||
[options] | ||
suppress_comment=.*\\$FlowFixMe | ||
suppress_comment=.*\\$FlowInvalidInputTest | ||
module.name_mapper='\(react-redux\)' -> '<PROJECT_ROOT>/config/flow-typed/GeneralStub.js' | ||
module.name_mapper='\(react\)' -> '<PROJECT_ROOT>/config/flow-typed/GeneralStub.js' | ||
module.name_mapper='\(redux\)' -> '<PROJECT_ROOT>/config/flow-typed/GeneralStub.js' | ||
module.name_mapper='.*\(.scss\|.png\)' -> '<PROJECT_ROOT>/config/flow-typed/GeneralStub.js' |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,34 @@ | ||
import React, { PropTypes } from 'react'; | ||
// @flow | ||
import React from 'react'; | ||
import cssModules from 'react-css-modules'; | ||
import Spinning from 'grommet-udacity/components/icons/Spinning'; | ||
import Box from 'grommet-udacity/components/Box'; | ||
import Heading from 'grommet-udacity/components/Heading'; | ||
import styles from './index.module.scss'; | ||
|
||
const LoadingIndicator = ({ | ||
isLoading, | ||
message, | ||
}) => ( | ||
<Box | ||
align="center" | ||
justify="center" | ||
className={styles.loadingIndicator} | ||
> | ||
{isLoading && | ||
<Box | ||
align="center" | ||
justify="center" | ||
> | ||
<Spinning /> | ||
<Heading tag="h3" align="center">{message}</Heading> | ||
</Box> | ||
} | ||
</Box> | ||
); | ||
|
||
LoadingIndicator.propTypes = { | ||
isLoading: PropTypes.bool.isRequired, | ||
message: PropTypes.string.isRequired, | ||
}; | ||
|
||
LoadingIndicator.defaultProps = { | ||
isLoading: true, | ||
message: 'Loading', | ||
}; | ||
function LoadingIndicator(props: { | ||
isLoading: boolean, | ||
message: string | ||
}) { | ||
const { message, isLoading } = props; | ||
const title = message || 'Loading'; | ||
return ( | ||
<Box | ||
align="center" | ||
justify="center" | ||
className={styles.loadingIndicator} | ||
> | ||
{isLoading && | ||
<Box | ||
align="center" | ||
justify="center" | ||
> | ||
<Spinning /> | ||
<Heading tag="h3" align="center">{title}</Heading> | ||
</Box> | ||
} | ||
</Box> | ||
); | ||
} | ||
|
||
export default cssModules(LoadingIndicator, styles); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,36 @@ | ||
import React, { PropTypes } from 'react'; | ||
// @flow | ||
import React from 'react'; | ||
import Header from 'grommet-udacity/components/Header'; | ||
import Title from 'grommet-udacity/components/Title'; | ||
import Anchor from 'grommet-udacity/components/Anchor'; | ||
import Search from 'grommet-udacity/components/Search'; | ||
import LogoImage from './logo.png'; | ||
import { StyledMenu, StyledLogo, LogoPlaceholder } from './styles'; | ||
|
||
const Navbar = ({ | ||
pathname, | ||
}) => ( | ||
<div> | ||
<Header justify="between"> | ||
<Title> | ||
{typeof window !== 'undefined' ? | ||
<StyledLogo src={LogoImage} alt="logo" /> | ||
: | ||
<LogoPlaceholder /> | ||
} | ||
</Title> | ||
<StyledMenu inline direction="row" align="center" responsive={false}> | ||
<Anchor href="/" className={pathname === '/' ? 'active' : ''}> | ||
Home | ||
</Anchor> | ||
<Anchor href="/about" className={pathname === '/about' ? 'active' : ''}> | ||
About | ||
</Anchor> | ||
<Search dropAlign={{ right: 'right' }} /> | ||
</StyledMenu> | ||
</Header> | ||
</div> | ||
); | ||
|
||
Navbar.propTypes = { | ||
pathname: PropTypes.string.isRequired, | ||
}; | ||
|
||
export default Navbar; | ||
export default function Navbar(props: { | ||
pathname: string | ||
}) { | ||
const { pathname } = props; | ||
return ( | ||
<div> | ||
<Header justify="between"> | ||
<Title> | ||
{typeof window !== 'undefined' ? | ||
<StyledLogo src={LogoImage} alt="logo" /> | ||
: | ||
<LogoPlaceholder /> | ||
} | ||
</Title> | ||
<StyledMenu inline direction="row" align="center" responsive={false}> | ||
<Anchor href="/" className={pathname === '/' ? 'active' : ''}> | ||
Home | ||
</Anchor> | ||
<Anchor href="/about" className={pathname === '/about' ? 'active' : ''}> | ||
About | ||
</Anchor> | ||
<Search dropAlign={{ right: 'right' }} /> | ||
</StyledMenu> | ||
</Header> | ||
</div> | ||
); | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
export const APPCONTAINER_DEFAULT_ACTION = 'APPCONTAINER_DEFAULT_ACTION'; | ||
const APPCONTAINER_DEFAULT_ACTION = 'APPCONTAINER_DEFAULT_ACTION'; | ||
export default APPCONTAINER_DEFAULT_ACTION; |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// @flow | ||
export default class Functors { | ||
static Identity = x => ({ | ||
map: f => Functors.Identity(f(x)), | ||
fold: f => f(x), | ||
inspect: () => `Functors.Identity(${x})`, | ||
}); | ||
static Right = x => ({ | ||
map: f => Functors.Right(f(x)), | ||
fold: (_, g) => g(x), | ||
inspect: () => `Functors.Right(${x})`, | ||
}); | ||
static Left = x => ({ | ||
map: () => Functors.Left(x), | ||
fold: f => f(x), | ||
inspect: () => `Functors.Left(${x})`, | ||
}); | ||
static Sum = x => ({ | ||
x, | ||
concat: ({ x: y }) => | ||
Functors.Sum(x + y), | ||
inspect: () => `Functors.Sum(${x})`, | ||
}); | ||
static All = x => ({ | ||
x, | ||
concat: ({ x: y }) => | ||
Functors.All(x && y), | ||
inspect: () => `Functors.All(${x})`, | ||
}); | ||
static First = x => ({ | ||
x, | ||
concat: () => | ||
Functors.First(x), | ||
inspect: () => `Functors.First(${x})`, | ||
}); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export Functors from './functors'; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export default {}; |
Oops, something went wrong.