mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 07:29:14 +01:00
minor reorg/cleanup
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
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
|
||||
Reference in New Issue
Block a user