From d431fdb52977749736c815ace265355ae0bf4f78 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Thu, 7 Dec 2023 10:38:20 +0100 Subject: [PATCH] fix(ui) uxt fixes --- frontend/app/components/UsabilityTesting/TestEdit.tsx | 7 ++++--- frontend/app/components/UsabilityTesting/TestOverview.tsx | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/frontend/app/components/UsabilityTesting/TestEdit.tsx b/frontend/app/components/UsabilityTesting/TestEdit.tsx index 6cfa67326..9bdcabf05 100644 --- a/frontend/app/components/UsabilityTesting/TestEdit.tsx +++ b/frontend/app/components/UsabilityTesting/TestEdit.tsx @@ -33,7 +33,9 @@ const menuItems = [ ]; function TestEdit() { - const [hasChanged, setHasChanged] = React.useState(false); + // @ts-ignore + const { siteId, testId } = useParams(); + const [hasChanged, setHasChanged] = React.useState(testId === 'new'); const { uxtestingStore } = useStore(); const [newTestTitle, setNewTestTitle] = React.useState(''); const [newTestDescription, setNewTestDescription] = React.useState(''); @@ -42,8 +44,7 @@ function TestEdit() { const [isModalVisible, setIsModalVisible] = React.useState(false); const [isConclusionEditing, setIsConclusionEditing] = React.useState(false); const [isOverviewEditing, setIsOverviewEditing] = React.useState(false); - // @ts-ignore - const { siteId, testId } = useParams(); + const { showModal, hideModal } = useModal(); const history = useHistory(); usePageTitle(`Usability Tests | ${uxtestingStore.instance ? 'Edit' : 'Create'}`); diff --git a/frontend/app/components/UsabilityTesting/TestOverview.tsx b/frontend/app/components/UsabilityTesting/TestOverview.tsx index 9226f5dd9..9ffa8204f 100644 --- a/frontend/app/components/UsabilityTesting/TestOverview.tsx +++ b/frontend/app/components/UsabilityTesting/TestOverview.tsx @@ -331,10 +331,10 @@ const Title = observer(({ testId, siteId }: any) => { toast.success('The usability test is now live and accessible to participants.'); break; case 'paused': - toast.success('Usability test is on \'Hold\'—participant activity paused. Resume at your convenience.'); + toast.success('Usability test is on \'Hold\'—participant activity paused. Switch it to “ongoing” to resume activity.'); break; case 'closed': - toast.success('he usability test has been marked as completed. All participant interactions are now finalized.'); + toast.success('The usability test has been marked as completed. All participant interactions are now finalized.'); break; } };