Sha256: 3ed395a87134f818c1259d8ccbd2f9da3515844e06d8bdfa94598f5650e79ad4

Contents?: true

Size: 362 Bytes

Versions: 15

Compression:

Stored size: 362 Bytes

Contents

import { createStore } from "redux";

export default createStore((state = [], action) => {
  switch(action.type) {
  case "ERROR":
    return [...state, { message: action.message, type: "error" }];
  case "NOTICE":
    return [...state, { message: action.message, type: "notice" }];
  case "NEXT":
    return state.slice(1);
  default:
    return state;
  }
});

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
pages_core-3.12.1 app/javascript/stores/ToastStore.jsx
pages_core-3.12.0 app/javascript/stores/ToastStore.jsx
pages_core-3.11.3 app/javascript/stores/ToastStore.jsx
pages_core-3.11.2 app/javascript/stores/ToastStore.jsx
pages_core-3.11.1 app/javascript/stores/ToastStore.jsx
pages_core-3.11.0 app/javascript/stores/ToastStore.jsx
pages_core-3.10.2 app/javascript/stores/ToastStore.jsx
pages_core-3.10.1 app/javascript/stores/ToastStore.jsx
pages_core-3.9.2 app/javascript/stores/ToastStore.jsx
pages_core-3.9.1 app/javascript/stores/ToastStore.jsx
pages_core-3.9.0 app/javascript/stores/ToastStore.jsx
pages_core-3.8.3 app/javascript/stores/ToastStore.jsx
pages_core-3.8.2 app/javascript/stores/ToastStore.jsx
pages_core-3.8.1 app/javascript/components/ToastStore.jsx
pages_core-3.8.0 app/javascript/components/ToastStore.jsx