feat: Add search input to collection and home (#1149)
* feat: Add search input to collection and home * Tweak spacing * Add input to drafts/starred too
This commit is contained in:
@ -64,9 +64,14 @@ export function newDocumentUrl(
|
||||
return route;
|
||||
}
|
||||
|
||||
export function searchUrl(query?: string): string {
|
||||
if (query) return `/search/${encodeURIComponent(query)}`;
|
||||
return `/search`;
|
||||
export function searchUrl(query?: string, collectionId?: string): string {
|
||||
let route = '/search';
|
||||
if (query) route += `/${encodeURIComponent(query)}`;
|
||||
|
||||
if (collectionId) {
|
||||
route += `?collectionId=${collectionId}`;
|
||||
}
|
||||
return route;
|
||||
}
|
||||
|
||||
export function notFoundUrl(): string {
|
||||
|
Reference in New Issue
Block a user