moved editor to separate reducer

This commit is contained in:
Fedor Katurov 2020-01-09 10:59:26 +07:00
parent e950d98b73
commit 87670770b0
38 changed files with 1425 additions and 1069 deletions
src/utils

View file

@ -164,4 +164,7 @@ export const toTranslit = (string: string = ''): string =>
export const parseDesc = (text: string = ''): string => text.replace(/(\n{2,})/gi, '\n\n');
// export const colorizeTitle = (text: string): string => text.replace(/(\[[^\]^]+\])/, ``)
export const getEstimated = (distance: number, speed: number = 15): number => {
const time = (distance && (distance / speed)) || 0;
return (time && parseFloat(time.toFixed(1)));
};