From 216d148e0f7844e831312eb3709958356b81f92f Mon Sep 17 00:00:00 2001 From: Max Patiiuk Date: Fri, 7 Oct 2022 13:31:29 -0500 Subject: [PATCH] Fix Schema Config save redirecting to wrong page Fixes #2239 --- .../js_src/lib/components/SchemaConfig/index.tsx | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/specifyweb/frontend/js_src/lib/components/SchemaConfig/index.tsx b/specifyweb/frontend/js_src/lib/components/SchemaConfig/index.tsx index 47a07bfd3f7..a8cc154cc45 100644 --- a/specifyweb/frontend/js_src/lib/components/SchemaConfig/index.tsx +++ b/specifyweb/frontend/js_src/lib/components/SchemaConfig/index.tsx @@ -17,7 +17,11 @@ import { formatUrl } from '../Router/queryString'; import { SchemaConfigHeader } from './Components'; import { SchemaConfigField } from './Field'; import { SchemaConfigColumn, SchemaConfigFields } from './Fields'; -import { useSchemaContainer, useContainerItems, useContainerString } from './Hooks'; +import { + useContainerItems, + useContainerString, + useSchemaContainer, +} from './Hooks'; import type { SchemaData } from './SetupHooks'; import { SchemaConfigTable } from './Table'; @@ -187,7 +191,5 @@ const handleSaved = async (rawLanguage: string): Promise => ) // Reload the page after schema changes .then((): void => - globalThis.location.assign( - formatUrl('/specify/task/schema-config/', { rawLanguage }) - ) + globalThis.location.assign(`/specify/schema-config/${rawLanguage}/`) );