New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
206 - Refactor nav #211
206 - Refactor nav #211
Conversation
@@ -7,3 +7,13 @@ export enum ResourceType { | |||
API_KEYS = 'API Keys', | |||
POLICIES = 'policies', | |||
} | |||
|
|||
// TODO: added this for now to make compiler happy |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😃 🤖
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't really comment on a draft like this, its mostly just stuff commented out to satisfy temporarily building WIP code.
src/components/AppProviders.tsx
Outdated
// import { EntityProvider } from './global/hooks/useEntityContext'; | ||
// import RESOURCE_MAP from 'common/RESOURCE_MAP'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DELETE MEEEEEE
src/components/Nav/Nav.tsx
Outdated
| ResourceType.POLICIES; | ||
|
||
const iconStyle = { opacity: 0.9 }; | ||
const navIcons: { [key in ParentResource]: () => ReactElement } = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Slightly cleaner type description: const navIcons: Record<ParentResource, ()=>ReactEelement>
. Just tested it as functionally equivalent to what you used but it cleans up the TS linter messages when there are keys missing.
Removes resource map references in Nav. Main changes in
Nav.tsx
andApp.tsx
subResourceId
, ui doesn't use this level of nesting anymore. renamessubResourceName
tochildResourceName