File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import { createSignal , useSetSignal , useSignalValue } from 'reactjs-signal' ;
1+ import { createSignal , useSignal } from 'reactjs-signal' ;
22
33import { type CommandList } from '@/extensions/SlashCommand/types' ;
44
5- interface SignalCommandListState {
6- commandList : CommandList [ ] ;
7- }
8-
9- const useSignalCommandListStore = createSignal < SignalCommandListState > ( {
10- commandList : [ ] ,
11- } ) ;
5+ const useSignalCommandListStore = createSignal < CommandList [ ] > ( [ ] ) ;
126
137export function useSignalCommandList ( ) {
14- const commandList = useSignalValue ( useSignalCommandListStore ) . commandList ;
15- const setCommandList = useSetSignal ( useSignalCommandListStore ) ;
8+ const [ commandList , setCommandList ] = useSignal ( useSignalCommandListStore ) ;
169
1710 return [ commandList , setCommandList ] as const ;
1811}
You can’t perform that action at this time.
0 commit comments