-import { writable } from 'svelte/store';
+import { derived, writable } from 'svelte/store';
/*
* This is a store to set the actions in the top header.
actions.update((actionsValue) => {
- actionsValue.topic_id = id;
+ actionsValue.topic = {
+ id
+ };
return actionsValue;
});
};
actions.update((actionsValue) => {
- delete actionsValue.id;
+ delete actionsValue.topic;
return actionsValue;
});
};
+
+export const topicActions = derived(
+ actions,
+ ($actions) => $actions.topic
+);