Commit 8021cd99 authored by / /\ / /\/'s avatar / /\ / /\/
Browse files

resolve lint errors in ResolveRoute

parent ecad88df
import GDPRUserList from './utils/GDPRUserList'; import GDPRUserList from './utils/GDPRUserList';
export const routeRegex = { export const routeRegex = {
UserProfile1: /^\/(@[\w\.\d-]+)\/?$/, UserProfile1: /^\/(@[\w.\d-]+)\/?$/,
UserProfile2: /^\/(@[\w\.\d-]+)\/(transfers|curation-rewards|author-rewards|permissions|communities|password|settings)\/?$/, UserProfile2: /^\/(@[\w.\d-]+)\/(transfers|curation-rewards|author-rewards|permissions|communities|password|settings)\/?$/,
}; };
export default function resolveRoute(path) { export default function resolveRoute(path) {
let match;
if (path === '/') { if (path === '/') {
return { page: 'WalletIndex' }; return { page: 'WalletIndex' };
} }
...@@ -61,7 +60,7 @@ export default function resolveRoute(path) { ...@@ -61,7 +60,7 @@ export default function resolveRoute(path) {
if (path === '/proposals') { if (path === '/proposals') {
return { page: 'Proposals' }; return { page: 'Proposals' };
} }
match = const match =
path.match(routeRegex.UserProfile1) || path.match(routeRegex.UserProfile1) ||
path.match(routeRegex.UserProfile2); path.match(routeRegex.UserProfile2);
if (match) { if (match) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment