import React from 'react';
import { BrowserRouter, Route, Switch } from 'react-router-dom';

import LoginScreen from '../screens/LoginScreen';
import CuratorScreen from '../screens/curator/CuratorScreen';
import HomeScreen from '../screens/home/HomeScreen';
import PrivateRoute from './PrivateRoute';

export function Router() {
    return (
        <BrowserRouter>
            <Switch>
                <PrivateRoute path="/curadoria">
                    <CuratorScreen />
                </PrivateRoute>
                <Route path="/login">
                    <LoginScreen />
                </Route>
                <Route exact path="/categoria/:categoryName">
                    <HomeScreen />
                </Route>
                <Route exact path="/">
                    <HomeScreen />
                </Route>
            </Switch>
        </BrowserRouter>
    );
}
