From 42e0fdb71e445f1d4fe9fb6565048c7ab13ef1e5 Mon Sep 17 00:00:00 2001 From: nick-delirium Date: Fri, 1 Dec 2023 14:01:19 +0100 Subject: [PATCH] fix(ui): uxt fixes --- .../components/UsabilityTesting/UsabilityTesting.tsx | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/app/components/UsabilityTesting/UsabilityTesting.tsx b/frontend/app/components/UsabilityTesting/UsabilityTesting.tsx index 0982fa5e7..accfdc510 100644 --- a/frontend/app/components/UsabilityTesting/UsabilityTesting.tsx +++ b/frontend/app/components/UsabilityTesting/UsabilityTesting.tsx @@ -136,7 +136,7 @@ function TestsTable() { } > {uxtestingStore.tests.map((test) => ( - + ))} @@ -175,11 +175,16 @@ const statusMap = { closed: "Completed", } -function Row({ test }: { test: UxTListEntry }) { +function Row({ test, siteId }: { test: UxTListEntry, siteId: string }) { const link = usabilityTestingView(test.testId.toString()) const editLink = usabilityTestingEdit(test.testId.toString()) + const history = useHistory() + + const redirect = () => { + history.push(withSiteId(test.status === 'preview' ? editLink : link, siteId)) + } return ( -
+
} />