diff options
author | eug-vs <eug-vs@keemail.me> | 2020-08-08 09:33:45 +0300 |
---|---|---|
committer | eug-vs <eug-vs@keemail.me> | 2020-08-08 09:33:45 +0300 |
commit | 10e146ef0215d41527f0466b0e139a6805b96540 (patch) | |
tree | fff44e753ea02132c3717002a9e6f5642a860f43 /src/pages/ProfilePage/ProfilePage.tsx | |
parent | cc1133ff817218f80476d91ec509c5eaa6be86e6 (diff) | |
download | which-ui-10e146ef0215d41527f0466b0e139a6805b96540.tar.gz |
refactor: remove urls file
Diffstat (limited to 'src/pages/ProfilePage/ProfilePage.tsx')
-rw-r--r-- | src/pages/ProfilePage/ProfilePage.tsx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/pages/ProfilePage/ProfilePage.tsx b/src/pages/ProfilePage/ProfilePage.tsx index ec917fd..b81c70f 100644 --- a/src/pages/ProfilePage/ProfilePage.tsx +++ b/src/pages/ProfilePage/ProfilePage.tsx @@ -7,7 +7,6 @@ import ProfileInfo from './ProfileInfo'; import Feed from '../../components/Feed/Feed'; import { get } from '../../requests'; import { useAuth } from '../../hooks/useAuth'; -import urls from '../urls'; const ProfilePage: React.FC = () => { @@ -24,8 +23,8 @@ const ProfilePage: React.FC = () => { setIsInfoLoading(true); const redirect = () => { - if (user) history.push(urls.profile(user.username)); - else history.push(urls.login); + if (user) history.push(`/profile/${user.username}`); + else history.push('/login'); }; if (username) { |