added more path fixes

This commit is contained in:
Wyatt Johnson
2017-07-31 09:52:46 +10:00
parent 993688837a
commit 299bb35c9d
4 changed files with 14 additions and 8 deletions
+3 -5
View File
@@ -1,6 +1,6 @@
import React from 'react';
import {Router, Route, IndexRedirect, browserHistory, Redirect} from 'react-router';
import {useBasename} from 'history';
import {Router, Route, IndexRedirect, Redirect} from 'react-router';
import {history} from 'coral-framework/helpers/router';
import Configure from 'routes/Configure';
import Dashboard from 'routes/Dashboard';
@@ -57,8 +57,6 @@ const routes = (
</div>
);
const AppRouter = () => <Router history={useBasename(() => browserHistory)({
basename: '/talk/'
})} routes={routes}/>;
const AppRouter = () => <Router history={history} routes={routes}/>;
export default AppRouter;
+3 -2
View File
@@ -1,5 +1,6 @@
import React from 'react';
import {Router, Route, browserHistory} from 'react-router';
import {Router, Route} from 'react-router';
import {history} from 'coral-framework/helpers/router';
import Embed from './containers/Embed';
import {LoginContainer} from 'coral-sign-in/containers/LoginContainer';
@@ -11,6 +12,6 @@ const routes = (
</div>
);
const AppRouter = () => <Router history={browserHistory} routes={routes} />;
const AppRouter = () => <Router history={history} routes={routes} />;
export default AppRouter;
@@ -36,7 +36,7 @@ export default class Embed extends React.Component {
<div className={cn('talk-embed-stream', {'talk-embed-stream-highlight-comment': hasHighlightedComment})}>
<IfSlotIsNotEmpty slot="login">
<Popup
href='/embed/stream/login'
href='embed/stream/login'
title='Login'
features='menubar=0,resizable=0,width=500,height=550,top=200,left=500'
open={showSignInDialog}
+7
View File
@@ -0,0 +1,7 @@
import {useBasename} from 'history';
import {browserHistory} from 'react-router';
import {BASE_PATH} from 'coral-framework/constants/url';
export const history = useBasename(() => browserHistory)({
basename: BASE_PATH
});