diff options
Diffstat (limited to 'src/stores/actions.js')
| -rw-r--r-- | src/stores/actions.js | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/stores/actions.js b/src/stores/actions.js deleted file mode 100644 index f7fbc28..0000000 --- a/src/stores/actions.js +++ /dev/null @@ -1,32 +0,0 @@ -import { derived, writable } from 'svelte/store'; - -/* - * This is a store to set the actions in the top header. - */ - -const actions = writable({}); - -export const enableTopicActions = (id) => { - - actions.update((actionsValue) => { - - actionsValue.topic = { - id - }; - return actionsValue; - }); -}; - -export const disableTopicActions = () => { - - actions.update((actionsValue) => { - - delete actionsValue.topic; - return actionsValue; - }); -}; - -export const topicActions = derived( - actions, - ($actions) => $actions.topic -); |