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:
parent
c4286f24af
commit
150a8df543
@ -1,5 +1,7 @@
|
||||
// @flow
|
||||
|
||||
import React, { Component } from 'react';
|
||||
|
||||
class Category extends Component {
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -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)) }
|
||||
|
@ -1,3 +1,5 @@
|
||||
// @flow
|
||||
|
||||
import React, { Component } from 'react';
|
||||
import { If } from 'jsx-control-statements';
|
||||
import R from 'ramda';
|
||||
|
@ -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 }
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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 }
|
||||
|
@ -10,4 +10,4 @@ module.exports = {
|
||||
CategoryChild,
|
||||
Home,
|
||||
NoMatch
|
||||
}
|
||||
}
|
||||
|
@ -1,3 +1,4 @@
|
||||
// @flow
|
||||
|
||||
export type Category = {
|
||||
uid : string,
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -2,4 +2,4 @@ import { fetchData } from './fetchData';
|
||||
|
||||
module.exports = {
|
||||
fetchData
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user