]>
git.r.bdr.sh - rbdr/forum/blob - src/stores/actions.js
ae0190624c751017923a92d9c6ae37364173a28c
1 import { derived
, writable
} from 'svelte/store';
4 * This is a store to set the actions in the top header.
7 export 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