import { createSlice } from '@reduxjs/toolkit';
import initialImages from './images.json';

export const Images = createSlice({
  name: 'images',
  initialState: {
    value: initialImages
  },
  reducers: {
    updateImages: (state, newState) => {
      state.value = newState.payload;
    },
  },
})

// Action creators are generated for each case reducer function
export const { updateImages } = Images.actions

export default Images.reducer