Update active nav item based on url

This commit is contained in:
Marliana Lara
2018-12-03 13:17:53 -05:00
parent 1e7ab9deed
commit 9341c4660c
3 changed files with 306 additions and 281 deletions

View File

@@ -1,6 +1,9 @@
import React from 'react';
import { render } from 'react-dom';
import {
HashRouter as Router
} from 'react-router-dom';
import App from './App';
import api from './api';
import { API_ROOT } from './endpoints';
@@ -15,8 +18,8 @@ import './components/DataListToolbar/styles.scss';
const el = document.getElementById('app');
const main = async () => {
const { custom_logo, custom_login_info } = await api.get(API_ROOT);
render(<App logo={custom_logo} loginInfo={custom_login_info} />, el);
const { custom_logo, custom_login_info } = await api.get(API_ROOT);
render(<Router><App logo={custom_logo} loginInfo={custom_login_info} /></Router>, el);
};
main();