Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
hive
wallet
Commits
8021cd99
Commit
8021cd99
authored
Aug 23, 2019
by
/ /\ / /\/
Browse files
resolve lint errors in ResolveRoute
parent
ecad88df
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/app/ResolveRoute.js
View file @
8021cd99
import
GDPRUserList
from
'
./utils/GDPRUserList
'
;
export
const
routeRegex
=
{
UserProfile1
:
/^
\/(
@
[\w
\
.\d
-
]
+
)\/?
$/
,
UserProfile2
:
/^
\/(
@
[\w
\
.\d
-
]
+
)\/(
transfers|curation-rewards|author-rewards|permissions|communities|password|settings
)\/?
$/
,
UserProfile1
:
/^
\/(
@
[\w
.
\d
-
]
+
)\/?
$/
,
UserProfile2
:
/^
\/(
@
[\w
.
\d
-
]
+
)\/(
transfers|curation-rewards|author-rewards|permissions|communities|password|settings
)\/?
$/
,
};
export
default
function
resolveRoute
(
path
)
{
let
match
;
if
(
path
===
'
/
'
)
{
return
{
page
:
'
WalletIndex
'
};
}
...
...
@@ -61,7 +60,7 @@ export default function resolveRoute(path) {
if
(
path
===
'
/proposals
'
)
{
return
{
page
:
'
Proposals
'
};
}
match
=
const
match
=
path
.
match
(
routeRegex
.
UserProfile1
)
||
path
.
match
(
routeRegex
.
UserProfile2
);
if
(
match
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment