feat: remember last selected team id (#2210)

Co-authored-by: Liyas Thomas <liyascthomas@gmail.com>
Co-authored-by: Andrew Bastin <andrewbastin.k@gmail.com>
This commit is contained in:
Anwarul Islam
2022-04-02 15:47:37 +06:00
committed by GitHub
parent 183d5f3545
commit 8cafef48fb
4 changed files with 98 additions and 4 deletions

View File

@@ -1,6 +1,5 @@
import {
customRef,
DeepReadonly,
onBeforeUnmount,
readonly,
Ref,
@@ -17,7 +16,7 @@ export const useNuxt = wrapProperty("$nuxt")
export function useReadonlyStream<T>(
stream$: Observable<T>,
initialValue: T
): Ref<DeepReadonly<T>> {
): Ref<T> {
let sub: Subscription | null = null
onBeforeUnmount(() => {
@@ -32,7 +31,7 @@ export function useReadonlyStream<T>(
targetRef.value = value
})
return readonly(targetRef)
return readonly(targetRef) as Ref<T>
}
export function useStream<T>(