{"size": 1212, "ext": "js", "max_stars_repo_path": "src/components/App.js", "max_stars_repo_name": "rarcz29/eliboo_client", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/components/App.js", "max_issues_repo_name": "rarcz29/eliboo_client", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/components/App.js", "max_forks_repo_name": "rarcz29/eliboo_client", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.1860465116, "max_line_length": 72, "alphanum_fraction": 0.5528052805}
import { UserContextProvider } from 'context/userContext';
import React from 'react';
import { BrowserRouter } from 'react-router-dom';
import GlobalStyle from 'styles/GlobalStyle';
import Router from './Router';

function App() {
    // const authenticate = async (formDataJsonString) => {
    //     const response = await authService.login(formDataJsonString);

    //     if (response?.token) {
    //         setAuthenticated(true);
    //         history.push('/');
    //     } else if (response?.message) {
    //         console.log(response.message);
    //     } else {
    //         console.log('no connection');
    //     }
    // };

    // const register = async (formDataJsonString) => {
    //     await authService.register(formDataJsonString);
    //     history.push('/');
    // };

    // const logout = () => {
    //     authService.logout();
    //     setAuthenticated(false);
    //     history.push('/');
    // };
    // TODO: user routing paths from constants
    return (
        <UserContextProvider>
            <BrowserRouter>
                <GlobalStyle />
                <Router />
            </BrowserRouter>
        </UserContextProvider>
    );
}

export default App;
