Skip to content

Commit

Permalink
refactor(cleanup): remove hardcoded shortcuts and commands arrays
Browse files Browse the repository at this point in the history
  • Loading branch information
d-rita committed Nov 6, 2024
1 parent 5421520 commit f6a5c9d
Showing 1 changed file with 8 additions and 32 deletions.
40 changes: 8 additions & 32 deletions components/header-bar/src/header-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,39 +56,11 @@ export const HeaderBar = ({
}))
}, [data, baseUrl])

const commands = [
{
description: 'Search for and open a visualisation, chart, or table',
displayName: 'Open',
icon: 'https://domain.tld/api/../icons/open.png',
name: 'open',
},
{
description: 'Copy debug information to the clipboard',
displayName: 'Debug',
icon: 'https://domain.tld/api/../icons/debug.png',
name: 'debug',
},
{
description: 'Empty system cache',
displayName: 'Clear cache',
icon: 'https://domain.tld/api/../icons/clear-cache.png',
name: 'clear-cache',
},
]
// fetch commands
const commands = []

const shortcuts = [
{
displayName: 'Data elements overview',
icon: 'https://domain.tld/api/../icons/dhis-web-dashboard.png',
name: 'Data elements overview',
},
{
displayName: 'Data sets',
icon: 'https://domain.tld/api/../icons/dhis-web-dashboard.png',
name: 'Data sets',
},
]
// fetch shortcuts
const shortcuts = []

// See https://jira.dhis2.org/browse/LIBS-180
if (!loading && !error) {
Expand Down Expand Up @@ -134,6 +106,10 @@ export const HeaderBar = ({
apps={apps}
commands={commands}
shortcuts={shortcuts}
// apps={[]}

// commands={[]}
// shortcuts={[]}
/>
</CommandPaletteContextProvider>
<Profile
Expand Down

0 comments on commit f6a5c9d

Please sign in to comment.