added theme compatibility

This commit is contained in:
Annika Hannig 2022-07-25 23:04:07 +02:00
parent b2bb0b3d5d
commit a106a84b36
3 changed files with 6 additions and 7 deletions

View File

@ -7,8 +7,6 @@
<link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
<link rel="stylesheet" href="%PUBLIC_URL%/assets/fonts/source-sans-pro.css" />
<!-- ###THEME_STYLESHEETS### -->
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
@ -21,8 +19,8 @@
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<!-- ###THEME_STYLESHEETS### -->
<div id="app"></div>
<!-- ###THEME_SCRIPTS### -->
</body>
</html>

View File

@ -19,9 +19,11 @@ const Sidebar = () => {
<div className="sidebar-header">
<div className="logo">
<Link to='/'>
<i>{/* Theme compatbility */}
<FontAwesomeIcon
className="logo-icon"
icon={faCloud} size="lg" transform="grow-11" />
</i>
</Link>
</div>
<div className="title">

View File

@ -59,7 +59,7 @@ export const NeighborsProvider = ({children, routeServerId}) => {
const [state, setState] = useState(initialState);
useEffect(() => {
setState((s) => ({...s, isLoading: true}));
setState(initialState);
// Load RouteServer's neighbors
axios.get(`/api/v1/routeservers/${routeServerId}/neighbors`).then(
({data}) => {
@ -70,7 +70,6 @@ export const NeighborsProvider = ({children, routeServerId}) => {
});
},
(error) => {
handleError(error);
setState((s) => ({...s, isLoading: false}));
}
);
@ -113,7 +112,7 @@ export const RelatedNeighborsProvider = ({children}) => {
if (!neighbor) {
return;
}
setState((s) => ({...s, isLoading: true}));
setState(initialState);
// Load related neighbors
const queryUrl = `/api/v1/lookup/neighbors?asn=${neighbor.asn}`;
axios.get(queryUrl).then(
@ -124,7 +123,7 @@ export const RelatedNeighborsProvider = ({children}) => {
});
},
(error) => {
handleError(error);
// Ignore the error for now.
setState((s) => ({...s, isLoading: false}));
}
);