aboutsummaryrefslogtreecommitdiff
path: root/src/lib/stores/actions.ts
diff options
context:
space:
mode:
authorRuben Beltran del Rio <ruben@unlimited.pizza>2022-05-01 01:02:58 +0200
committerRuben Beltran del Rio <ruben@unlimited.pizza>2022-05-01 01:02:58 +0200
commitcac85db02ff00732cf75d473dc3411332f33d845 (patch)
tree5f244968a905eb3888434b3f60cbf05d2b652207 /src/lib/stores/actions.ts
parenta7cf03c192470cbab13edeb1aec99e0c66dede10 (diff)
Apply formatting
Diffstat (limited to 'src/lib/stores/actions.ts')
-rw-r--r--src/lib/stores/actions.ts33
1 files changed, 13 insertions, 20 deletions
diff --git a/src/lib/stores/actions.ts b/src/lib/stores/actions.ts
index 95702dc..19e9a69 100644
--- a/src/lib/stores/actions.ts
+++ b/src/lib/stores/actions.ts
@@ -2,11 +2,11 @@ import { derived, writable } from 'svelte/store';
import type { Readable, Writable } from 'svelte/store';
export type Actions = {
- topic?: TopicAction
+ topic?: TopicAction;
};
export type TopicAction = {
- id: string
+ id: string;
};
/*
@@ -16,26 +16,19 @@ export type TopicAction = {
const actions: Writable<Actions> = writable({});
export const enableTopicActions = (id: string) => {
-
- actions.update((actionsValue: Actions): Actions => {
-
- actionsValue.topic = {
- id
- };
- return actionsValue;
- });
+ actions.update((actionsValue: Actions): Actions => {
+ actionsValue.topic = {
+ id
+ };
+ return actionsValue;
+ });
};
export const disableTopicActions = () => {
-
- actions.update((actionsValue): Actions => {
-
- delete actionsValue.topic;
- return actionsValue;
- });
+ actions.update((actionsValue): Actions => {
+ delete actionsValue.topic;
+ return actionsValue;
+ });
};
-export const topicActions: Readable<TopicAction> = derived(
- actions,
- ($actions) => $actions.topic
-);
+export const topicActions: Readable<TopicAction> = derived(actions, ($actions) => $actions.topic);