refactor src folder structure

This commit is contained in:
Maarten 2024-08-13 09:22:08 +02:00
parent 0bfb70af8b
commit d0e26e2882
30 changed files with 94 additions and 134 deletions

View file

@ -1,48 +0,0 @@
// dataStore.js
import { createSlice } from '@reduxjs/toolkit';
const dataStore = createSlice( {
name: 'data',
initialState: {
session: {
token: '',
name: '',
device: '',
language: 'nl',
address: {
id: 0,
zipcode: '',
houseNumber: '',
street: '',
city: '',
},
coordinates: {
latitude: '',
longitude: '',
},
notifications: {
dayBefore: 'off',
sameDay: 'off',
},
},
reloadCalendar: true,
viewCategory: null,
},
reducers: {
setSession: (state, action) => {
state.session = action.payload;
},
setReloadCalendar: (state, action) => {
state.reloadCalendar = action.payload;
},
setViewCategory: (state, action) => {
state.viewCategory = action.payload;
},
},
} );
export const { setSession } = dataStore.actions;
export const { setReloadCalendar } = dataStore.actions;
export const { setViewCategory } = dataStore.actions;
export default dataStore.reducer;