mirror of
https://github.com/austinried/subtracks.git
synced 2025-12-27 09:09:29 +01:00
16 lines
250 B
TypeScript
16 lines
250 B
TypeScript
import { useStore } from '@app/state/store'
|
|
|
|
const useClient = () => {
|
|
const client = useStore(store => store.client)
|
|
|
|
return () => {
|
|
if (!client) {
|
|
throw new Error('no client!')
|
|
}
|
|
|
|
return client
|
|
}
|
|
}
|
|
|
|
export default useClient
|