@@ -12,8 +12,8 @@ import { createSearch } from "lib/search/module"
1212import { ui } from "ui/module"
1313import { users } from "users/module"
1414import { AuthListener } from "users"
15- import { COLLECTION , ProjectOwner } from "projects"
16- import { getWords } from "lib/search"
15+ import { COLLECTION , ProjectOwner , ProjectDetails } from "projects"
16+ import { getWords , SearchFn } from "lib/search"
1717import { getProjectsStore } from "getProjectsStore"
1818import { createProject } from "./createProject"
1919import { logConfig , logEvent } from "analytics"
@@ -62,12 +62,12 @@ export const module: ModuleImpl<State, Actions> = {
6262 }
6363 actions . users . initAuthentication ( [ authListener ] )
6464
65- const searchFn = ( text , range ) => {
65+ const searchFn : SearchFn = ( text , range ) => {
6666 if ( ! text || text . trim ( ) === "" ) {
6767 return projectsStore . query ( {
6868 collection : COLLECTION ,
6969 where : [ { attribute : "hidden" , op : "==" , value : false } ] ,
70- first : range . value ,
70+ first : range . index ,
7171 limit : range . count
7272 } )
7373 }
@@ -77,7 +77,7 @@ export const module: ModuleImpl<State, Actions> = {
7777 collection : COLLECTION ,
7878 where : [ { attribute, op : ">" , value : 0 } ] ,
7979 orderBy : { attribute, descending : true } ,
80- first : range . value ,
80+ first : range . index ,
8181 limit : range . count
8282 } )
8383 }
0 commit comments