import React, { useState, useEffect } from 'react';

import { Layout, Menu, Row, Col } from 'antd';
import { Button } from 'antd';
import { HomeOutlined, ReadOutlined } from '@ant-design/icons';

import classNames from 'classnames';

import logo from './logo.svg';
import './App.less';

import {
  BrowserRouter as Router,
  Switch,
  Route,
  Link,
  Redirect
} from "react-router-dom";

import TopMenuNoAuth from './components/Menu/Top/NoAuth';

import Home from './pages/Home';
import Login from './pages/Login';
import Register from './pages/Register';
import Dashboard from './pages/Dashboard';
import NotFound from './pages/NotFound';

const { Header, Content, Footer } = Layout;
const { SubMenu } = Menu;

export default () => {

  return (
    <Router>
      <Layout>
        <TopMenuNoAuth />
        <Content>
          <Switch>
            <Route path="/dashboard">
              <Dashboard />
            </Route>
            <Route path="/login">
              <Login />
            </Route>
            <Route path="/register">
              <Register />
            </Route>
            <Route path="/">
              <Home />
            </Route>
          </Switch>
        </Content>
        <Footer>
          <h2>Plataforma Social</h2>
          Desenvolvimento de demonstração.
        </Footer>
      </Layout>
    </Router>
  );
};