Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 44036d4

Browse files
committed
design updates
1 parent c87558d commit 44036d4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+803
-433
lines changed

src/App.jsx

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,38 @@
11
/**
22
* Main App component
33
*/
4-
import React from "react";
4+
import React, {useState, useCallback} from "react";
55
import MainMenu from "./components/MainMenu";
66
import NavBar from "./components/NavBar";
77
import { Router } from "@reach/router";
88
import { APPS } from "./constants";
9+
import {
10+
createHistory,
11+
LocationProvider
12+
} from "@reach/router"
13+
14+
// History for location provider
15+
let history = createHistory(window)
916

1017
const App = () => {
18+
// Left sidebar collapse state
19+
const [sidebarCollapsed, setSidebarCollapsed] = useState(false);
20+
// Toggle left sidebar callback
21+
const toggleSidebar = useCallback(() => {
22+
setSidebarCollapsed(!sidebarCollapsed);
23+
}, [sidebarCollapsed, setSidebarCollapsed]);
24+
1125
return (
12-
<>
26+
<LocationProvider history={history}>
1327
<NavBar />
1428
<div className="main-menu-wrapper">
1529
<Router>
1630
{APPS.map((app) => (
17-
<MainMenu key={app.path} path={app.path + "/*"} app={app} />
31+
<MainMenu sidebarCollapsed={sidebarCollapsed} toggleSidebar={toggleSidebar} key={app.path} path={app.path + "/*"} app={app} />
1832
))}
1933
</Router>
2034
</div>
21-
</>
35+
</LocationProvider>
2236
);
2337
};
2438

src/assets/images/all-apps-menu.svg

Lines changed: 1 addition & 9 deletions
Loading

src/assets/images/apis-green.svg

Lines changed: 5 additions & 0 deletions
Loading

src/assets/images/apis.svg

Lines changed: 5 additions & 0 deletions
Loading

src/assets/images/app-challenge-manager.svg

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/assets/images/app-name-1.svg

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/assets/images/app-name-2.svg

Lines changed: 0 additions & 23 deletions
This file was deleted.

src/assets/images/app-projects.svg

Lines changed: 0 additions & 21 deletions
This file was deleted.

0 commit comments

Comments
 (0)