1
1
mirror of https://github.com/aelve/guide.git synced 2024-12-23 04:42:24 +03:00

[GD-11] Add Flow to all modules

This commit is contained in:
Artyom 2017-05-04 19:33:45 +03:00
parent c4286f24af
commit 150a8df543
No known key found for this signature in database
GPG Key ID: B8E35A33FF522710
10 changed files with 23 additions and 9 deletions

View File

@ -1,5 +1,7 @@
// @flow
import React, { Component } from 'react';
class Category extends Component {
}
}

View File

@ -1,3 +1,5 @@
// @flow
import React, { Component } from 'react';
import * as T from '../types';
import { fetchData } from '../utils/index';
@ -31,8 +33,8 @@ class CategoryChild extends Component {
<div>
<h1>{ this.state.cat.title }</h1>
<If condition={this.state.cat.description !== undefined}>
<div dangerouslySetInnerHTML=
{{__html: this.state.cat.description.html}} />
<div dangerouslySetInnerHTML={{__html:
this.state.cat.description.html}} />
</If>
<If condition={this.state.cat.items !== undefined}>
{ this.state.cat.items.map(i => item(i.uid, i.name)) }

View File

@ -1,3 +1,5 @@
// @flow
import React, { Component } from 'react';
import { If } from 'jsx-control-statements';
import R from 'ramda';

View File

@ -1,3 +1,5 @@
// @flow
import React, { Component } from 'react';
import { GrandCategory } from './GrandCategory';
import { Tiles } from './Tiles';
@ -27,4 +29,4 @@ class Home extends Component {
}
}
module.exports = { Home }
module.exports = { Home }

View File

@ -1,3 +1,5 @@
// @flow
import React, { Component } from 'react';
import { Link } from 'react-router-dom';
@ -14,4 +16,4 @@ class NoMatch extends Component {
module.exports = {
NoMatch
}
}

View File

@ -1,3 +1,5 @@
// @flow
import React, { Component } from 'react';
// Tiles grouped into columns
@ -27,4 +29,4 @@ class Tiles extends Component {
}
}
module.exports = { Tiles }
module.exports = { Tiles }

View File

@ -10,4 +10,4 @@ module.exports = {
CategoryChild,
Home,
NoMatch
}
}

View File

@ -1,3 +1,4 @@
// @flow
export type Category = {
uid : string,

View File

@ -1,3 +1,4 @@
// @flow
function checkStatus(response) {
if (response.status >= 200 && response.status < 300) {
@ -22,4 +23,4 @@ function fetchData(url : string) : Promise<any> {
module.exports = {
fetchData
}
}

View File

@ -2,4 +2,4 @@ import { fetchData } from './fetchData';
module.exports = {
fetchData
}
}