Files
diplom-frontend/app/store/private-channels.ts
2025-05-15 05:20:01 +03:00

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 }),
})
)