14 lines
408 B
TypeScript
14 lines
408 B
TypeScript
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 }),
|
|
})
|
|
) |