From cd9b802b71df4e2701e2311b2995fe70a9692ae4 Mon Sep 17 00:00:00 2001 From: Renard Date: Mon, 16 Sep 2019 01:22:56 -0300 Subject: Prettier --- src/App.js | 54 +++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 37 insertions(+), 17 deletions(-) (limited to 'src/App.js') diff --git a/src/App.js b/src/App.js index 99860cc..7b6bc94 100644 --- a/src/App.js +++ b/src/App.js @@ -1,14 +1,14 @@ -import React, { Component } from 'react'; +import React, { Component } from "react"; import { render } from "react-dom"; import { Router, Link } from "@reach/router"; -import 'fomantic-ui-css/semantic.css'; +import "fomantic-ui-css/semantic.css"; import "./App.css"; import { Dropdown, Menu, Icon, Loader, Container } from "semantic-ui-react"; import Home from "./Home"; import Thread from "./Thread"; import Board from "./Board"; -import NotFound from "./NotFound" +import NotFound from "./NotFound"; class App extends Component { constructor() { @@ -16,16 +16,15 @@ class App extends Component { this.state = { boardList: [], isLoaded: false - } - + }; } componentDidMount() { fetch("https://bienvenidoainternet.org/cgi/api/boards") - .then((response) => { + .then(response => { return response.json(); }) - .then((resource) => { + .then(resource => { this.setState({ boardList: resource["boards"], isLoaded: true }); }) .catch(console.error); @@ -37,8 +36,8 @@ class App extends Component { return ( Cargando ... - - ) + + ); } } @@ -49,15 +48,37 @@ class App extends Component { B.a.I - Home - + + Home + + - {boardList.map(board => board.board_type === 1 ? /{board.dir}/ - {board.name} : null)} + {boardList.map(board => + board.board_type === 1 ? ( + + /{board.dir}/ - {board.name} + + ) : null + )} - + - {boardList.map(board => board.board_type === 0 ? /{board.dir}/ - {board.name} : null)} + {boardList.map(board => + board.board_type === 0 ? ( + + /{board.dir}/ - {board.name} + + ) : null + )} @@ -71,11 +92,10 @@ class App extends Component { - + ); } } - -render(, document.getElementById("root")); \ No newline at end of file +render(, document.getElementById("root")); -- cgit v1.2.1-18-gbd029