This repository has been archived on 2022-08-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
outline/frontend/utils/routeHelpers.js
Tom Moor 9f18bd2fb1 Restore 'e' to edit current document
Fixed up ? to open keyboard shortcuts
2017-07-14 08:48:42 -07:00

32 lines
588 B
JavaScript

// @flow
import Document from 'models/Document';
export function homeUrl(): string {
return '/dashboard';
}
export function starredUrl(): string {
return '/starred';
}
export function newCollectionUrl(): string {
return '/collections/new';
}
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`;
}
export function notFoundUrl(): string {
return '/404';
}