diff --git a/client/src/backend/containers/resource/Properties.js b/client/src/backend/containers/resource/Properties.js index a7f43d08b0..566ae08524 100644 --- a/client/src/backend/containers/resource/Properties.js +++ b/client/src/backend/containers/resource/Properties.js @@ -44,12 +44,17 @@ export class ResourcePropertiesContainer extends PureComponent { }; render() { - const resource = this.props.resource.attributes; - const t = this.props.t; + const { resource, t } = this.props; + const { attributes } = resource ?? {}; + const sortOrderBool = !!attributes?.sortOrder; + return (
@@ -69,7 +74,7 @@ export class ResourcePropertiesContainer extends PureComponent { diff --git a/client/src/global/components/navigation/helpers.js b/client/src/global/components/navigation/helpers.js index 2ca67f13d8..22d44841b8 100644 --- a/client/src/global/components/navigation/helpers.js +++ b/client/src/global/components/navigation/helpers.js @@ -29,10 +29,6 @@ export const getAdminModeLabel = ({ currentUser, mode, t }) => { }; const FE_ROUTE_MAP = { - resource: { - regex: /^\/projects\/([A-Za-z0-9-]+)\/resource/, - link: `/backend/projects/resource` - }, resourceCollectionResource: { regex: /^\/projects\/([A-Za-z0-9-]+)\/resource-collection\/([A-Za-z0-9-]+)\/resource/, link: `/backend/projects/resource` @@ -41,6 +37,10 @@ const FE_ROUTE_MAP = { regex: /^\/projects\/([A-Za-z0-9-]+)\/resource-collection/, link: `/backend/projects/resource-collection` }, + resource: { + regex: /^\/projects\/([A-Za-z0-9-]+)\/resource/, + link: `/backend/projects/resource` + }, projectCollection: { regex: /^\/projects\/project-collection/, link: `/backend/projects/project-collections`,