.
This commit is contained in:
14
app/store/private-channels.ts
Normal file
14
app/store/private-channels.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { create } from 'zustand'
|
||||
import type { RecipientChannel } from '~/lib/api/types'
|
||||
|
||||
type PrivateChannelsStore = {
|
||||
channels: RecipientChannel[]
|
||||
setChannels: (channels: RecipientChannel[]) => void
|
||||
}
|
||||
|
||||
export const usePrivateChannelsStore = create<PrivateChannelsStore>()(
|
||||
(set, get) => ({
|
||||
channels: [],
|
||||
setChannels: (channels: RecipientChannel[]) => set({ channels }),
|
||||
})
|
||||
)
|
||||
Reference in New Issue
Block a user