refactor: convert function expressions to declarations (#4926)

This commit is contained in:
Vladislav Shkodin
2021-02-08 20:01:21 +02:00
committed by GitHub
parent c0236536dd
commit 141a2eba56
241 changed files with 3444 additions and 2933 deletions

View File

@ -2,11 +2,16 @@ import { createHashHistory } from 'history';
const history = createHashHistory();
export const navigateToCollection = (collectionName: string) =>
history.push(`/collections/${collectionName}`);
export const navigateToNewEntry = (collectionName: string) =>
history.replace(`/collections/${collectionName}/new`);
export const navigateToEntry = (collectionName: string, slug: string) =>
history.replace(`/collections/${collectionName}/entries/${slug}`);
export function navigateToCollection(collectionName: string) {
return history.push(`/collections/${collectionName}`);
}
export function navigateToNewEntry(collectionName: string) {
return history.replace(`/collections/${collectionName}/new`);
}
export function navigateToEntry(collectionName: string, slug: string) {
return history.replace(`/collections/${collectionName}/entries/${slug}`);
}
export default history;