]>
git.r.bdr.sh - rbdr/forum/blob - src/stores/actions.js
1 import { derived
, writable
} from 'svelte/store';
4 * This is a store to set the actions in the top header.
7 const actions
= writable({});
9 export const enableTopicActions
= (id
) => {
11 actions
.update((actionsValue
) => {
13 actionsValue
.topic
= {
20 export const disableTopicActions
= () => {
22 actions
.update((actionsValue
) => {
24 delete actionsValue
.topic
;
29 export const topicActions
= derived(
31 ($actions
) => $actions
.topic