Skip to content

Commit

Permalink
Fix Schema Config save redirecting to wrong page
Browse files Browse the repository at this point in the history
Fixes #2239
  • Loading branch information
maxpatiiuk committed Oct 7, 2022
1 parent 964093e commit 216d148
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions specifyweb/frontend/js_src/lib/components/SchemaConfig/index.tsx
Expand Up @@ -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';

Expand Down Expand Up @@ -187,7 +191,5 @@ const handleSaved = async (rawLanguage: string): Promise<void> =>
)
// Reload the page after schema changes
.then((): void =>
globalThis.location.assign(
formatUrl('/specify/task/schema-config/', { rawLanguage })
)
globalThis.location.assign(`/specify/schema-config/${rawLanguage}/`)
);

0 comments on commit 216d148

Please sign in to comment.