mirror of
https://github.com/pawelmalak/flame.git
synced 2025-08-07 11:55:17 +02:00
Added current time to header
This commit is contained in:
parent
76e68db06f
commit
ea57dbf750
10 changed files with 57 additions and 17 deletions
|
@ -19,6 +19,14 @@ import {
|
|||
import { ActionType } from '../action-types';
|
||||
import { storeUIConfig } from '../../utility';
|
||||
|
||||
const keys: (keyof Config)[] = [
|
||||
'useAmericanDate',
|
||||
'greetingsSchema',
|
||||
'daySchema',
|
||||
'monthSchema',
|
||||
'showTime',
|
||||
];
|
||||
|
||||
export const getConfig = () => async (dispatch: Dispatch<GetConfigAction>) => {
|
||||
try {
|
||||
const res = await axios.get<ApiResponse<Config>>('/api/config');
|
||||
|
@ -32,12 +40,6 @@ export const getConfig = () => async (dispatch: Dispatch<GetConfigAction>) => {
|
|||
document.title = res.data.data.customTitle;
|
||||
|
||||
// Store settings for priority UI elements
|
||||
const keys: (keyof Config)[] = [
|
||||
'useAmericanDate',
|
||||
'greetingsSchema',
|
||||
'daySchema',
|
||||
'monthSchema',
|
||||
];
|
||||
for (let key of keys) {
|
||||
storeUIConfig(key, res.data.data);
|
||||
}
|
||||
|
@ -66,12 +68,6 @@ export const updateConfig =
|
|||
});
|
||||
|
||||
// Store settings for priority UI elements
|
||||
const keys: (keyof Config)[] = [
|
||||
'useAmericanDate',
|
||||
'greetingsSchema',
|
||||
'daySchema',
|
||||
'monthSchema',
|
||||
];
|
||||
for (let key of keys) {
|
||||
storeUIConfig(key, res.data.data);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue