#10. Добавление localStorage сервиса, добавлены верхнее и нижнее меню приложения (#11)

This commit is contained in:
Nikolay
2020-12-26 22:33:23 +03:00
committed by GitHub
parent 31ad97954b
commit ef4a6ecbc8
37 changed files with 373 additions and 174 deletions

View File

@ -1 +1,9 @@
import {PageType} from '../enums/common';
import {isPageType} from '../referers/common';
export const numberToString = (num: number): string => num.toString();
export const getPageType = (pathname?: string): PageType => {
const path = pathname?.startsWith('/') ? pathname.slice(1) : pathname ?? '';
return isPageType(path) ? path : PageType.Main;
};