mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 09:46:25 +02:00
lazy loading fix for useDocument
This commit is contained in:
parent
cf162101a6
commit
d8797b4f71
2 changed files with 3 additions and 2 deletions
|
|
@ -23,7 +23,7 @@ export type DocumentType =
|
|||
| "LINEAR_CONNECTOR"
|
||||
| "DISCORD_CONNECTOR";
|
||||
|
||||
export function useDocuments(searchSpaceId: number, lazy: boolean = true) {
|
||||
export function useDocuments(searchSpaceId: number, lazy: boolean = false) {
|
||||
const [documents, setDocuments] = useState<Document[]>([]);
|
||||
const [loading, setLoading] = useState(!lazy); // Don't show loading initially for lazy mode
|
||||
const [error, setError] = useState<string | null>(null);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue