fix(ui) uxt fixes
This commit is contained in:
parent
55e1f71081
commit
6975282599
2 changed files with 11 additions and 7 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import React from 'react';
|
||||
import { connect } from 'react-redux';
|
||||
import { withRouter } from 'react-router-dom';
|
||||
import { useHistory } from 'react-router-dom';
|
||||
import {
|
||||
assist as assistRoute,
|
||||
withSiteId,
|
||||
|
|
@ -23,7 +23,7 @@ function LivePlayerBlockHeader(props: any) {
|
|||
const [hideBack, setHideBack] = React.useState(false);
|
||||
const { store } = React.useContext(PlayerContext);
|
||||
const { assistMultiviewStore } = useStore();
|
||||
|
||||
const history = useHistory();
|
||||
const { width, height } = store.get();
|
||||
|
||||
const {
|
||||
|
|
@ -32,7 +32,6 @@ function LivePlayerBlockHeader(props: any) {
|
|||
closedLive = false,
|
||||
siteId,
|
||||
location,
|
||||
history,
|
||||
isMultiview,
|
||||
} = props;
|
||||
|
||||
|
|
@ -42,7 +41,8 @@ function LivePlayerBlockHeader(props: any) {
|
|||
}, []);
|
||||
|
||||
const backHandler = () => {
|
||||
history.push(withSiteId(ASSIST_ROUTE, siteId));
|
||||
history.goBack();
|
||||
// history.push(withSiteId(ASSIST_ROUTE, siteId));
|
||||
};
|
||||
|
||||
const { userId, metadata, isCallActive, agentIds } = session;
|
||||
|
|
@ -117,4 +117,4 @@ const PlayerHeaderCont = connect(
|
|||
}
|
||||
)(observer(LivePlayerBlockHeader));
|
||||
|
||||
export default withRouter(PlayerHeaderCont);
|
||||
export default PlayerHeaderCont;
|
||||
|
|
|
|||
|
|
@ -74,8 +74,12 @@ function TestEdit() {
|
|||
setHasChanged(false);
|
||||
if (testId && testId !== 'new') {
|
||||
uxtestingStore.updateTest(uxtestingStore.instance!).then((testId) => {
|
||||
toast.success('The usability test is now live and accessible to participants.');
|
||||
history.push(withSiteId(usabilityTestingView(testId!.toString()), siteId));
|
||||
if (isPreview) {
|
||||
window.open(`${uxtestingStore.instance!.startingPath}?oruxt=${testId}`, '_blank', 'noopener,noreferrer');
|
||||
} else {
|
||||
toast.success('The usability test is now live and accessible to participants.');
|
||||
history.push(withSiteId(usabilityTestingView(testId!.toString()), siteId));
|
||||
}
|
||||
});
|
||||
} else {
|
||||
uxtestingStore.createNewTest(isPreview).then((test) => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue