import { writable } from 'svelte/store'; /* * This is a store to set the actions in the top header. */ export const actions = writable({}); export const enableTopicActions = (id) => { actions.update((actionsValue) => { actionsValue.topic_id = id; return actionsValue; }); }; export const disableTopicActions = () => { actions.update((actionsValue) => { delete actionsValue.id; return actionsValue; }); };