2019-12-16 02:05:44 +00:00
|
|
|
import { action, Action } from 'easy-peasy';
|
|
|
|
|
|
|
|
export interface SiteSettings {
|
|
|
|
name: string;
|
|
|
|
locale: string;
|
|
|
|
recaptcha: {
|
|
|
|
enabled: boolean;
|
|
|
|
siteKey: string;
|
|
|
|
};
|
2020-07-27 01:05:54 +00:00
|
|
|
analytics: string;
|
2019-12-16 02:05:44 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface SettingsStore {
|
|
|
|
data?: SiteSettings;
|
|
|
|
setSettings: Action<SettingsStore, SiteSettings>;
|
|
|
|
}
|
|
|
|
|
|
|
|
const settings: SettingsStore = {
|
|
|
|
data: undefined,
|
|
|
|
|
|
|
|
setSettings: action((state, payload) => {
|
|
|
|
state.data = payload;
|
|
|
|
}),
|
|
|
|
};
|
|
|
|
|
|
|
|
export default settings;
|