Skip to content

Commit

Permalink
feat: allow iframe plugin overrides for dev/test
Browse files Browse the repository at this point in the history
  • Loading branch information
edoardo committed Mar 2, 2023
1 parent 1dd409c commit f79f622
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/modules/localStorage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ export const getPreferredDashboardId = (username) =>
export const storePreferredDashboardId = (username, dashboardId) => {
localStorage.setItem(`dhis2.dashboard.current.${username}`, dashboardId)
}

export const getPluginOverrides = () =>
process.env.NODE_ENV !== 'production' && JSON.parse(localStorage.getItem('dhis2.dashboard.pluginOverrides')) || undefined

0 comments on commit f79f622

Please sign in to comment.