-
Notifications
You must be signed in to change notification settings - Fork 18
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
adding unique key for child instance #19378
Conversation
Code Climate has analyzed commit 5041c31 and detected 0 issues on this pull request. View more on Code Climate. |
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.
Looks good. Just noticed a couple of variables that could be using single quotes instead of double quotes. The replace function could also be pulled out to a utilities file, since its' the exact same regex and replace value repeated in a lot of different spots.
@@ -8,39 +8,49 @@ import { DocketSwitchRulingContainer } from './judgeRuling/DocketSwitchRulingCon | |||
import { DocketSwitchDenialContainer } from './denial/DocketSwitchDenialContainer'; | |||
import { DocketSwitchGrantContainer } from './grant/DocketSwitchGrantContainer'; | |||
|
|||
const basePath = "/queue/appeals/:appealId/tasks/:taskId"; |
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.
const basePath = "/queue/appeals/:appealId/tasks/:taskId"; | |
const basePath = '/queue/appeals/:appealId/tasks/:taskId'; |
@@ -38,35 +38,42 @@ const RoutedReturnToLitSupport = (props) => { | |||
); | |||
}; | |||
|
|||
const basePath = `/queue/appeals/:appealId/tasks/:taskId`; |
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.
const basePath = `/queue/appeals/:appealId/tasks/:taskId`; | |
const basePath = '/queue/appeals/:appealId/tasks/:taskId'; |
@@ -6,7 +6,7 @@ import { EditCavcRemandContainer } from './editCavcRemandContainer'; | |||
const basePath = '/queue/appeals/:appealId/edit_cavc_remand'; | |||
|
|||
const PageRoutes = [ | |||
<PageRoute path={basePath} title="Edit Cavc Remand | Caseflow"> | |||
<PageRoute path={basePath} title="Edit Cavc Remand | Caseflow" key={basePath.replace(/[^\w\s]/gi, '_')} > |
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.
You could pull this replace out to a helper function in a utils file since it is used across all these different files and routes.
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.
Looks good to me.
Resolves APPEALS-29283
Description
Added key on different Page Route to remove the warning.
Acceptance Criteria
Testing Plan
Frontend
User Facing Changes
Storybook Story
For Frontend (Presentation) Components
MyComponent.stories.js
alongsideMyComponent.jsx
)Backend
Database Changes
Only for Schema Changes
created_at
,updated_at
) for new tablesCaseflow::Migration
, especially when adding indexes (useadd_safe_index
) (see Writing DB migrations)migrate:rollback
works as desired (change
supported functions)make check-fks
; add any missing foreign keys or add toconfig/initializers/immigrant.rb
(see Record associations and Foreign Keys)belongs_to
for associations to enable the schema diagrams to be automatically updatedIntegrations: Adding endpoints for external APIs
Best practices
Code Documentation Updates
Tests
Test Coverage
Did you include any test coverage for your code? Check below:
Code Climate
Your code does not add any new code climate offenses? If so why?
Monitoring, Logging, Auditing, Error, and Exception Handling Checklist
Monitoring
Logging
Auditing
Error Handling
Exception Handling