-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
syntax updates to AddTokenModal simplification of tokens page, remove pagination from URL params
- Loading branch information
Showing
3 changed files
with
114 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,23 @@ | ||
import React from 'react'; | ||
|
||
import { Navigate, Route, Routes } from 'react-router-dom'; | ||
import EventEmitter from 'wolfy87-eventemitter'; | ||
|
||
import UserProfile from './pages/profile/user'; | ||
import { UserTokens } from './pages/profile/tokens'; | ||
import UserTokens from './pages/profile/tokens'; | ||
import './app.css'; | ||
import ElementWrapper from './components/elementWrapper'; | ||
import ProfilePage from './components/profile-page'; | ||
|
||
|
||
const Profile = () => { | ||
// TODO useEffect instead of eventEmitter | ||
const eventEmitter = new EventEmitter(); | ||
|
||
return ( | ||
<Routes> | ||
<Route path="" element={<ProfilePage eventEmitter={eventEmitter}/>}> | ||
<Route path="user" element={<UserProfile />} /> | ||
<Route path="tokens" element={<ElementWrapper routeElement={UserTokens} eventEmitter={eventEmitter} />} /> | ||
<Route path="*" element={<Navigate to="user" replace />}/> | ||
</Route> | ||
</Routes> | ||
); | ||
<Routes> | ||
<Route path="" element={<ProfilePage />}> | ||
<Route path="user" element={<UserProfile />} /> | ||
<Route path="tokens" element={<UserTokens />} /> | ||
<Route path="*" element={<Navigate to="user" replace />}/> | ||
</Route> | ||
</Routes>; | ||
}; | ||
|
||
Profile.propTypes = { | ||
|
||
}; | ||
Profile.propTypes = {}; | ||
|
||
export default Profile; |