fix(portfolio): User /:username routes as previously (#17470)
This commit is contained in:
committed by
Stuart Taylor
parent
a8756d5919
commit
259a0a594e
@ -3,5 +3,5 @@ import { types } from './redux';
|
|||||||
export { default } from './Profile.jsx';
|
export { default } from './Profile.jsx';
|
||||||
|
|
||||||
export const routes = {
|
export const routes = {
|
||||||
[types.onRouteProfile]: '/portfolio/:username'
|
[types.onRouteProfile]: '/:username'
|
||||||
};
|
};
|
||||||
|
@ -77,7 +77,7 @@ export class Settings extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<div className={ `${ns}-container` }>
|
<div className={ `${ns}-container` }>
|
||||||
<FullWidthRow>
|
<FullWidthRow>
|
||||||
<Link to={ `/portfolio/${username}` }>
|
<Link to={ `/${username}` }>
|
||||||
<Button
|
<Button
|
||||||
block={ true }
|
block={ true }
|
||||||
bsSize='lg'
|
bsSize='lg'
|
||||||
|
@ -19,7 +19,7 @@ const isDev = process.env.NODE_ENV !== 'production';
|
|||||||
const routes = [
|
const routes = [
|
||||||
'/settings',
|
'/settings',
|
||||||
'/settings/*',
|
'/settings/*',
|
||||||
'/portfolio/:username'
|
'/:username'
|
||||||
];
|
];
|
||||||
|
|
||||||
const devRoutes = [];
|
const devRoutes = [];
|
||||||
@ -37,6 +37,11 @@ export default function reactSubRouter(app) {
|
|||||||
(req, res) => res.redirect(`/challenges/${req.params.dashedName}`)
|
(req, res) => res.redirect(`/challenges/${req.params.dashedName}`)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
router.get(
|
||||||
|
'/portfolio/:redirectUsername',
|
||||||
|
(req, res) => res.redirect(`/${req.params.redirectUsername}`)
|
||||||
|
);
|
||||||
|
|
||||||
// These routes are in production
|
// These routes are in production
|
||||||
routes.forEach((route) => {
|
routes.forEach((route) => {
|
||||||
router.get(route, serveReactApp);
|
router.get(route, serveReactApp);
|
@ -1,38 +1,52 @@
|
|||||||
export const blacklistedUsernames = [
|
export const blacklistedUsernames = [
|
||||||
'bonfire',
|
'about',
|
||||||
'account',
|
'account',
|
||||||
'user',
|
'agile',
|
||||||
|
'api',
|
||||||
|
'bonfire',
|
||||||
|
'cats.json',
|
||||||
'challenge',
|
'challenge',
|
||||||
'challenges',
|
'challenges',
|
||||||
'completed-challenge',
|
|
||||||
'completed-zipline-or-basejump',
|
|
||||||
'completed-bonfire',
|
|
||||||
'map',
|
|
||||||
'learn-to-code',
|
|
||||||
'about',
|
|
||||||
'api',
|
|
||||||
'explorer',
|
|
||||||
'field-guide',
|
|
||||||
'completed-field-guide',
|
|
||||||
'jobs',
|
|
||||||
'nonprofits',
|
|
||||||
'sitemap.xml',
|
|
||||||
'get-help',
|
|
||||||
'chat',
|
'chat',
|
||||||
'twitch',
|
'completed-bonfire',
|
||||||
'get-pai',
|
'completed-challenge',
|
||||||
|
'completed-field-guide',
|
||||||
|
'completed-zipline-or-basejump',
|
||||||
|
'donate',
|
||||||
|
'events',
|
||||||
|
'explorer',
|
||||||
|
'external',
|
||||||
|
'field-guide',
|
||||||
|
'forgot',
|
||||||
|
'forum',
|
||||||
'get-help',
|
'get-help',
|
||||||
|
'get-help',
|
||||||
|
'get-pai',
|
||||||
|
'guide',
|
||||||
|
'internal',
|
||||||
|
'jobs',
|
||||||
|
'jobs-form',
|
||||||
|
'learn-to-code',
|
||||||
|
'login',
|
||||||
|
'logout',
|
||||||
|
'map',
|
||||||
|
'news',
|
||||||
|
'nonprofits',
|
||||||
'nonprofits',
|
'nonprofits',
|
||||||
'nonproifts-form',
|
'nonproifts-form',
|
||||||
'jobs-form',
|
'open-api',
|
||||||
'unsubscribe',
|
|
||||||
'unsubscribed',
|
|
||||||
'cats.json',
|
|
||||||
'agile',
|
|
||||||
'privacy',
|
'privacy',
|
||||||
'stories',
|
'privacy',
|
||||||
|
'reset',
|
||||||
|
'services',
|
||||||
'signin',
|
'signin',
|
||||||
'signout',
|
'signout',
|
||||||
'forgot',
|
'sitemap.xml',
|
||||||
'reset'
|
'stories',
|
||||||
|
'terms',
|
||||||
|
'twitch',
|
||||||
|
'unsubscribe',
|
||||||
|
'unsubscribed',
|
||||||
|
'user',
|
||||||
|
'wiki'
|
||||||
];
|
];
|
||||||
|
Reference in New Issue
Block a user