From a106a84b36d1d70d6e1184046ac5f7eae09bf00d Mon Sep 17 00:00:00 2001 From: Annika Hannig Date: Mon, 25 Jul 2022 23:04:07 +0200 Subject: [PATCH] added theme compatibility --- ui/public/index.html | 4 +--- ui/src/app/components/navigation/Sidebar.js | 2 ++ ui/src/app/context/neighbors.js | 7 +++---- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/ui/public/index.html b/ui/public/index.html index 0b82a9a..84f86ba 100644 --- a/ui/public/index.html +++ b/ui/public/index.html @@ -7,8 +7,6 @@ - - +
- diff --git a/ui/src/app/components/navigation/Sidebar.js b/ui/src/app/components/navigation/Sidebar.js index e84546c..0442aa4 100644 --- a/ui/src/app/components/navigation/Sidebar.js +++ b/ui/src/app/components/navigation/Sidebar.js @@ -19,9 +19,11 @@ const Sidebar = () => {
+ {/* Theme compatbility */} +
diff --git a/ui/src/app/context/neighbors.js b/ui/src/app/context/neighbors.js index 7130eaa..abcda76 100644 --- a/ui/src/app/context/neighbors.js +++ b/ui/src/app/context/neighbors.js @@ -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})); } );