u
This commit is contained in:
1 parent
572011017a
commit
ff3ee944d5
4 files changed
+215
-98
No files matched your search
@@ -4,6 +4,7 @@ interface SpaceState {
|
||||
userSpace: UserSpace | null
|
||||
setUserSpace: (space: UserSpace | null) => void
|
||||
clear: () => void
|
||||
inSpace: () => boolean
|
||||
}
|
||||
|
||||
export const useSpaceStore = create<SpaceState>((set, get) => ({
|
||||
@@ -14,4 +15,8 @@ export const useSpaceStore = create<SpaceState>((set, get) => ({
|
||||
userSpace: null,
|
||||
})
|
||||
},
|
||||
inSpace: () => {
|
||||
const userSpace = get().userSpace
|
||||
return userSpace !== null && userSpace.id !== 0
|
||||
},
|
||||
}))
|
||||
Reference in new issue
Block a user