mirror of
https://github.com/wassname/talk.git
synced 2026-08-02 13:10:23 +08:00
added more path fixes
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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}
|
||||
|
||||
@@ -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
|
||||
});
|
||||
Reference in New Issue
Block a user