diff --git a/packages/entity-persea/src/controllers/entity/component.jsx b/packages/entity-persea/src/controllers/entity/component.jsx index d5ec881..99759c4 100644 --- a/packages/entity-persea/src/controllers/entity/component.jsx +++ b/packages/entity-persea/src/controllers/entity/component.jsx @@ -9,7 +9,6 @@ import { useFlecks, useState, } from '@flecks/react'; -import {useParams} from '@flecks/react/router'; import { Tab, Tabs, @@ -23,9 +22,9 @@ import View from './view'; const EntityComponent = ({ resource, path, + uri, }) => { const flecks = useFlecks(); - const {uri} = useParams(); const {Entity, EntityList} = flecks.get('$avocado/resource.resources'); const [entity, setEntity] = useState(); useEffect(() => { @@ -89,10 +88,11 @@ EntityComponent.defaultProps = { EntityComponent.displayName = 'EntityComponent'; EntityComponent.propTypes = { + path: PropTypes.string, resource: PropTypes.shape({ traits: PropTypes.shape({}), }).isRequired, - path: PropTypes.string, + uri: PropTypes.string.isRequired, }; export default EntityComponent; diff --git a/packages/resource-persea/src/components/resource/index.jsx b/packages/resource-persea/src/components/resource/index.jsx index 038cc7a..cbe93d8 100644 --- a/packages/resource-persea/src/components/resource/index.jsx +++ b/packages/resource-persea/src/components/resource/index.jsx @@ -4,14 +4,12 @@ import { PropTypes, React, } from '@flecks/react'; -import {useParams} from '@flecks/react/router'; import useResourceController from '../../hooks/use-resource-controller'; import locals from './index.module.scss'; -const Resource = ({resource}) => { - const {uri} = useParams(); +const Resource = ({resource, uri}) => { const {Component} = useResourceController(uri); let displayedUri = basename(uri); if (0 === displayedUri.indexOf('index')) { @@ -19,7 +17,7 @@ const Resource = ({resource}) => { } return (