Commit babdda79 authored by Roger Jungemann's avatar Roger Jungemann
Browse files

Rename wallet home route

parent 43b69b94
......@@ -11,7 +11,7 @@ export const routeRegex = {
export default function resolveRoute(path) {
let match;
if (path === '/') {
return { page: 'PostsIndex' };
return { page: 'WalletIndex' };
}
if (path === '/about.html') {
return { page: 'About' };
......@@ -80,7 +80,7 @@ export default function resolveRoute(path) {
/^\/(cashout|payout|payout_comments|created|active)\/([\w\d-]+)\/?$/
);
if (match) {
return { page: 'PostsIndex', params: match.slice(1) };
return { page: 'WalletIndex', params: match.slice(1) };
}
return { page: 'NotFound' };
}
......@@ -24,7 +24,7 @@ describe('routeRegex', () => {
describe('resolveRoute', () => {
const test_cases = [
['/', { page: 'PostsIndex' }],
['/', { page: 'WalletIndex' }],
['/about.html', { page: 'About' }],
['/faq.html', { page: 'Faq' }],
['/login.html', { page: 'Login' }],
......
import App from 'app/components/App';
import Benchmark from 'app/components/pages/Benchmark';
import PostsIndex from 'app/components/pages/PostsIndex';
import WalletIndex from 'app/components/pages/WalletIndex';
import resolveRoute from './ResolveRoute';
// polyfill webpack require.ensure
......@@ -54,8 +54,8 @@ export default {
require.ensure([], require => {
cb(null, [require('app/components/pages/Market')]);
});
} else if (route.page === 'PostsIndex') {
cb(null, [PostsIndex]);
} else if (route.page === 'WalletIndex') {
cb(null, [WalletIndex]);
} else {
cb(process.env.BROWSER ? null : Error(404), [
require('app/components/pages/NotFound'),
......@@ -63,6 +63,6 @@ export default {
}
},
indexRoute: {
component: PostsIndex.component,
component: WalletIndex.component,
},
};
......@@ -56,7 +56,7 @@ class Header extends React.Component {
let topic = '';
let page_name = null;
if (route.page === 'PostsIndex') {
if (route.page === 'WalletIndex') {
} else if (route.page == 'Privacy') {
page_title = tt('navigation.privacy_policy');
} else if (route.page == 'Tos') {
......
......@@ -2,7 +2,7 @@
import React from 'react';
import { connect } from 'react-redux';
class PostsIndex extends React.Component {
class WalletIndex extends React.Component {
render() {
return <div />;
}
......@@ -17,5 +17,5 @@ module.exports = {
dispatch => {
return {};
}
)(PostsIndex),
)(WalletIndex),
};
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