@galadrim/galadmin 0.1.203 → 0.1.205

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -40,15 +40,15 @@ export default ({ logout, isMobile }) => {
40
40
  refreshData()
41
41
 
42
42
  if (config?.sidebar?.refreshInterval) {
43
- const interval = setInterval(refreshData, config.sidebar.refreshInterval)
44
- return () => clearInterval(interval)
43
+ const interval = setInterval(refreshData, config.sidebar.refreshInterval)
44
+ return () => clearInterval(interval)
45
45
  }
46
46
  }, []);
47
47
 
48
48
  const refreshData = () => {
49
- axios.get("/notificationBadges").then((response) => {
50
- setNotificationBadges(response.data)
51
- })
49
+ axios.get("/notificationBadges").then((response) => {
50
+ setNotificationBadges(response.data)
51
+ })
52
52
  }
53
53
 
54
54
  return (
@@ -56,8 +56,10 @@ export default ({ logout, isMobile }) => {
56
56
  {config.logo ? <img src={config.logo} class="logo" /> : null}
57
57
  <div class="sidebarTitle">{config.name}</div>
58
58
  <div class="sidebarSubtitle">Back-office</div>
59
- {config.views.filter(view => !view.hidden).map((view, i) => {
60
- if (view.type === "link") {
59
+ {config.views.map((view, i) => {
60
+ if (view.hidden) {
61
+ return null;
62
+ } else if (view.type === "link") {
61
63
  return (
62
64
  <a href={view.src} key={i}>
63
65
  <div class="sidebarItem">