Added endpoint for fetching server-side variables.

This commit is contained in:
Mike Cao 2022-08-01 23:04:47 -07:00
parent 68d35c0fc4
commit 50e491af06
8 changed files with 62 additions and 15 deletions

View file

@ -20,6 +20,7 @@ const initialState = {
dashboard: getItem(DASHBOARD_CONFIG) || defaultDashboardConfig,
shareToken: null,
user: null,
config: null,
};
const store = create(() => ({ ...initialState }));
@ -45,4 +46,8 @@ export function setDashboard(dashboard) {
setItem(DASHBOARD_CONFIG, dashboard);
}
export function setConfig(config) {
store.setState({ config });
}
export default store;