Restore 'e' to edit current document

Fixed up ? to open keyboard shortcuts
This commit is contained in:
Tom Moor
2017-07-14 08:48:42 -07:00
parent 4992ceab69
commit 9f18bd2fb1
3 changed files with 26 additions and 10 deletions

View File

@ -1,4 +1,5 @@
// @flow
import Document from 'models/Document';
export function homeUrl(): string {
return '/dashboard';
@ -12,7 +13,15 @@ export function newCollectionUrl(): string {
return '/collections/new';
}
export function searchUrl(query: string): string {
export function documentUrl(doc: Document): string {
return doc.url;
}
export function documentEditUrl(doc: Document): string {
return `${doc.url}/edit`;
}
export function searchUrl(query?: string): string {
if (query) return `/search/${query}`;
return `/search`;
}