From 5756921f22c0f7ac6133df21973bf0b15d56cc61 Mon Sep 17 00:00:00 2001 From: Renard Date: Thu, 12 Sep 2019 18:00:03 -0300 Subject: Linting --- src/App.js | 6 +++--- src/BBSThread.js | 5 ++--- src/Board.js | 5 ++--- src/Post.js | 2 +- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/App.js b/src/App.js index c28d63f..0579156 100644 --- a/src/App.js +++ b/src/App.js @@ -1,10 +1,10 @@ import React, { Component } from 'react'; import { render } from "react-dom"; -import { Router, Link, Match } from "@reach/router"; +import { Router, Link } from "@reach/router"; import 'fomantic-ui-css/semantic.css'; import "./App.css"; -import { Dropdown, Menu, Icon, Loader, Container, Grid } from "semantic-ui-react"; +import { Dropdown, Menu, Icon, Loader, Container } from "semantic-ui-react"; import Home from "./Home"; import BBSThread from "./BBSThread"; import Board from "./Board"; @@ -43,7 +43,7 @@ class App extends Component { } const { boardList } = this.state; - const pathList = boardList.map(board => "/" + board.dir) + //const pathList = boardList.map(board => "/" + board.dir) return ( diff --git a/src/BBSThread.js b/src/BBSThread.js index 747682b..025f258 100644 --- a/src/BBSThread.js +++ b/src/BBSThread.js @@ -1,5 +1,5 @@ import React, { Component } from "react"; -import { Header, Icon, Loader, Message, Segment, Image, Label } from "semantic-ui-react"; +import { Header, Icon, Loader, Message } from "semantic-ui-react"; import Moment from "react-moment"; import "moment/locale/es"; import Post from "./Post"; @@ -27,7 +27,7 @@ class BBSThread extends Component { fetch(apiURl) .then((response) => { return response.json() }) .then((resource => { - if (resource["state"] == "error") { + if (resource["state"] === "error") { console.log("API Error:" + resource["message"]); this.setState({ error: resource }); } @@ -37,7 +37,6 @@ class BBSThread extends Component { } render() { const { isLoading, error } = this.state; - const filesize = require('filesize'); if (isLoading) { return ( diff --git a/src/Board.js b/src/Board.js index beb8a74..bec11a3 100644 --- a/src/Board.js +++ b/src/Board.js @@ -1,9 +1,8 @@ import React, { Component } from "react"; -import { Loader, Message, Segment, Header, Icon, Image } from "semantic-ui-react"; +import { Loader, Message, Segment, Header } from "semantic-ui-react"; import { Link } from "@reach/router"; import Moment from "react-moment"; import "moment/locale/es"; -import Post from "./Post"; class Board extends Component { constructor() { super(); @@ -20,7 +19,7 @@ class Board extends Component { return response.json(); }) .then((resource) => { - if (resource["state"] == "error") { + if (resource["state"] === "error") { this.setState({ error: resource }); } this.setState({ isLoaded: true, threadList: resource["threads"] }) diff --git a/src/Post.js b/src/Post.js index 956cf72..a09cccf 100644 --- a/src/Post.js +++ b/src/Post.js @@ -15,7 +15,7 @@ const Post = ({ index, post, locked, dir }) => { - {post.file != "" ? + {post.file !== "" ? -- cgit v1.2.1-18-gbd029