Skip to content

Commit

Permalink
fix: fixed invalid datasource format
Browse files Browse the repository at this point in the history
  • Loading branch information
mbret committed Feb 25, 2024
1 parent be0ba7d commit ecdca58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/web/src/collections/list/CollectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,15 @@ import { useCSS } from "../../common/utils"
import { ReactWindowList } from "../../common/lists/ReactWindowList"
import { CollectionListItemList } from "./CollectionListItemList"
import { CollectionDocType } from "@oboku/shared"
import { DeepReadonlyObject } from "rxdb"

export const CollectionList: FC<
{
renderHeader?: () => React.ReactNode
headerHeight?: number
style?: React.CSSProperties
data: string[]
onItemClick?: (item: CollectionDocType) => void
onItemClick?: (item: DeepReadonlyObject<CollectionDocType>) => void
viewMode?: "list" | "grid"
itemMode?: ComponentProps<typeof CollectionListItemList>["viewMode"]
static?: boolean
Expand Down
5 changes: 3 additions & 2 deletions packages/web/src/dataSources/useDataSources.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { filter, switchMap } from "rxjs"
import { filter, map, switchMap } from "rxjs"
import { isDefined, useForeverQuery, useSignalValue } from "reactjrx"
import { latestDatabase$ } from "../rxdb/useCreateDatabase"
import { libraryStateSignal } from "../library/states"
Expand All @@ -19,7 +19,8 @@ export const useDataSources = () => {
return db.datasource.find({
selector: { isProtected: { $ne: true } }
}).$
})
}),
map((items) => items.map((item) => item.toJSON()))
)
})
}

0 comments on commit ecdca58

Please sign in to comment.