Добавление функции для построения url ссылок внутри приложения, добавление функции triggerLink для сервисов (#31)

This commit is contained in:
Nikolay
2020-12-28 00:26:20 +03:00
committed by GitHub
parent 27de662b5f
commit e8635972c6
6 changed files with 148 additions and 11 deletions

View File

@ -10,7 +10,8 @@ import SearchIcon from '@material-ui/icons/Search';
import {Avatar} from '@material-ui/core';
import {useParams} from '_hooks/useParams';
import {PageType} from '_enums/common';
import {PAGE_TITLE, ROUTES} from '_consts/common';
import {PAGE_TITLE} from '_consts/common';
import {buildPath} from '../../../core/utils/buildPath';
const NO_NAME_AVATAR = 'https://d.newsweek.com/en/full/425257/02-10-putin-economy.jpg';
@ -33,7 +34,7 @@ const TopMenu: React.FC = () => {
const history = useHistory();
const handleGoRoot = () => {
history.push(ROUTES.MAIN);
history.push(buildPath({pageType: PageType.Main}));
};
const title = PAGE_TITLE[pageType];