Added website limit and show more button. Closes #592.
This commit is contained in:
19
store/app.js
19
store/app.js
@@ -1,10 +1,23 @@
|
||||
import create from 'zustand';
|
||||
import { DEFAULT_LOCALE, DEFAULT_THEME, LOCALE_CONFIG, THEME_CONFIG } from 'lib/constants';
|
||||
import {
|
||||
DASHBOARD_CONFIG,
|
||||
DEFAULT_LOCALE,
|
||||
DEFAULT_THEME,
|
||||
LOCALE_CONFIG,
|
||||
THEME_CONFIG,
|
||||
DEFAULT_WEBSITE_LIMIT,
|
||||
} from 'lib/constants';
|
||||
import { getItem } from 'lib/web';
|
||||
|
||||
const defaultDashboardConfig = {
|
||||
showCharts: true,
|
||||
limit: DEFAULT_WEBSITE_LIMIT,
|
||||
};
|
||||
|
||||
const initialState = {
|
||||
locale: getItem(LOCALE_CONFIG) || DEFAULT_LOCALE,
|
||||
theme: getItem(THEME_CONFIG) || DEFAULT_THEME,
|
||||
dashboard: getItem(DASHBOARD_CONFIG) || defaultDashboardConfig,
|
||||
shareToken: null,
|
||||
user: null,
|
||||
};
|
||||
@@ -27,4 +40,8 @@ export function setUser(user) {
|
||||
store.setState({ user });
|
||||
}
|
||||
|
||||
export function setDashboard(dashboard) {
|
||||
store.setState({ dashboard });
|
||||
}
|
||||
|
||||
export default store;
|
||||
|
||||
Reference in New Issue
Block a user