Skip to content
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

Merged
merged 8 commits into from Jun 1, 2022
Merged

206 - Refactor nav #211

merged 8 commits into from Jun 1, 2022

Conversation

anncatton
Copy link
Contributor

@anncatton anncatton commented May 13, 2022

Removes resource map references in Nav. Main changes in Nav.tsx and App.tsx

  • resource names & icons in defined map
  • comments out most components to allow branch to build properly. Components will be re-added as refactor is done
  • some import fixes
  • removes subResourceId, ui doesn't use this level of nesting anymore. renames subResourceName to childResourceName

@anncatton anncatton changed the title Refactor nav 206 - Refactor nav May 13, 2022
@anncatton anncatton requested a review from joneubank May 13, 2022 15:49
@@ -7,3 +7,13 @@ export enum ResourceType {
API_KEYS = 'API Keys',
POLICIES = 'policies',
}

// TODO: added this for now to make compiler happy
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😃 🤖

Copy link
Contributor

@joneubank joneubank left a 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.

Comment on lines 10 to 11
// import { EntityProvider } from './global/hooks/useEntityContext';
// import RESOURCE_MAP from 'common/RESOURCE_MAP';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DELETE MEEEEEE

| ResourceType.POLICIES;

const iconStyle = { opacity: 0.9 };
const navIcons: { [key in ParentResource]: () => ReactElement } = {
Copy link
Contributor

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.

@anncatton anncatton merged commit e684b2d into 161-replace-freactal Jun 1, 2022
@anncatton anncatton deleted the refactor-nav branch June 1, 2022 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants