From 111921d3a85b3e89e444ebd5d4c98b0ba9a1df23 Mon Sep 17 00:00:00 2001 From: Pavlo Burchak Date: Tue, 30 May 2023 16:35:06 +0300 Subject: [PATCH] prettier fix --- src/store/TriggersLocalStore.ts | 34 +++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/src/store/TriggersLocalStore.ts b/src/store/TriggersLocalStore.ts index 82bdac4bb..ab0ab1f51 100644 --- a/src/store/TriggersLocalStore.ts +++ b/src/store/TriggersLocalStore.ts @@ -1,25 +1,27 @@ -import {useRef} from "react"; +import {useRef} from 'react'; + import {create} from 'zustand'; import {devtools} from 'zustand/middleware'; import {shallow} from 'zustand/shallow'; + import createTriggersSlice, {TriggersSlice} from './TriggersSlice'; const useTriggersLocalStore = () => { - const useStoreRef = useRef( - create()( - devtools( - (...a) => ({ - ...createTriggersSlice(...a), - }), - {name: 'Triggers Local Store Zustand', enabled: process.env.NODE_ENV === 'development'} - ) - ) - ); - const useStore = useStoreRef.current; - - const useShallowLocalStore = (selector: (state: TriggersSlice) => U) => useStore(selector, shallow); + const useStoreRef = useRef( + create()( + devtools( + (...a) => ({ + ...createTriggersSlice(...a), + }), + {name: 'Triggers Local Store Zustand', enabled: process.env.NODE_ENV === 'development'} + ) + ) + ); + const useStore = useStoreRef.current; + + const useShallowLocalStore = (selector: (state: TriggersSlice) => U) => useStore(selector, shallow); - return [useShallowLocalStore]; -}; + return [useShallowLocalStore]; +}; export default useTriggersLocalStore;