]> git.r.bdr.sh - rbdr/forum/blobdiff - src/lib/stores/actions.ts
Apply formatting
[rbdr/forum] / src / lib / stores / actions.ts
index 95702dc10b7404a913b489254ed8eb4fe71bb050..19e9a6976b4465764d2cb3934f073378ef545a99 100644 (file)
@@ -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);