File tree Expand file tree Collapse file tree
src/library-authoring/generic/history-log Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ export const HistoryComponentLog = ({ componentId }: { componentId: string; }) =
4949 < div className = "history-log" >
5050 { draftHistory && draftHistory . length !== 0 && (
5151 < HistoryDraftLogGroup
52- itemId = { componentId }
52+ itemKey = { componentId }
5353 displayName = { componentMetadata ?. displayName || '' }
5454 entries = { draftHistory }
5555 />
@@ -151,7 +151,7 @@ export const HistoryContainerLog = ({ containerId }: { containerId: string; }) =
151151 < div className = "history-log" >
152152 { draftHistory && draftHistory . length !== 0 && (
153153 < HistoryDraftLogGroup
154- itemId = { containerId }
154+ itemKey = { containerId }
155155 displayName = { container ?. displayName ?? '' }
156156 entries = { draftHistory }
157157 />
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ describe('<HistoryLogGroup />', () => {
3232
3333 render (
3434 < HistoryDraftLogGroup
35- itemId = { mockLibraryBlockDraftHistory . usageKey }
35+ itemKey = { mockLibraryBlockDraftHistory . usageKey }
3636 displayName = "Test Component"
3737 entries = { draftEntries }
3838 /> ,
@@ -76,7 +76,7 @@ describe('<HistoryLogGroup />', () => {
7676
7777 render (
7878 < HistoryDraftLogGroup
79- itemId = { mockLibraryContainerDraftHistory . containerKey }
79+ itemKey = { mockLibraryContainerDraftHistory . containerKey }
8080 displayName = "Intro Unit"
8181 entries = { containerDraftEntries }
8282 /> ,
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ export interface HistoryCreatedLogGroupProps {
3030}
3131
3232export interface HistoryDraftLogGroupProps {
33- itemId : string ;
33+ itemKey : string ;
3434 displayName : string ;
3535 entries : LibraryHistoryEntry [ ] ;
3636}
@@ -98,7 +98,7 @@ export const HistoryCreatedLogGroup = ({
9898} ;
9999
100100export const HistoryDraftLogGroup = ( {
101- itemId ,
101+ itemKey ,
102102 displayName,
103103 entries,
104104} : HistoryDraftLogGroupProps ) => {
@@ -125,7 +125,7 @@ export const HistoryDraftLogGroup = ({
125125 />
126126 </ Collapsible . Trigger >
127127 < Collapsible . Body >
128- < HistoryLogGroupEntries itemId = { itemId } entries = { entries } />
128+ < HistoryLogGroupEntries itemKey = { itemKey } entries = { entries } />
129129 </ Collapsible . Body >
130130 </ Collapsible . Advanced >
131131 < div className = "history-log-vert" />
@@ -186,7 +186,7 @@ export const HistoryPublishLogGroup = ({
186186 </ div >
187187 </ >
188188 ) :
189- < HistoryLogGroupEntries entries = { entries ?? [ ] } itemId = { itemId } /> }
189+ < HistoryLogGroupEntries entries = { entries ?? [ ] } itemKey = { itemId } /> }
190190 </ Collapsible . Body >
191191 </ Collapsible . Advanced >
192192 ) :
Original file line number Diff line number Diff line change @@ -11,12 +11,12 @@ import { useToggleWithValue } from '@src/hooks';
1111import HistoryCompareChangesModal from '@src/library-authoring/generic/history-log/HistoryCompareChangesModal' ;
1212
1313export interface HistoryLogGroupEntriesProps {
14- itemId : string ;
14+ itemKey : string ;
1515 entries : LibraryHistoryEntry [ ] ;
1616}
1717
1818export const HistoryLogGroupEntries = ( {
19- itemId ,
19+ itemKey ,
2020 entries,
2121} : HistoryLogGroupEntriesProps ) => {
2222 const intl = useIntl ( ) ;
@@ -69,11 +69,11 @@ export const HistoryLogGroupEntries = ({
6969 { moment ( entry . changedAt ) . fromNow ( ) }
7070 </ span >
7171 </ Stack >
72- { ! isContainerUsageKey ( itemId ) &&
72+ { ! isContainerUsageKey ( itemKey ) &&
7373 (
7474 < Dropdown >
7575 < Dropdown . Toggle
76- id = { `dropdown-toggle-${ itemId } -${ entry . changedAt } -${ index } ` }
76+ id = { `dropdown-toggle-${ itemKey } -${ entry . changedAt } -${ index } ` }
7777 as = { IconButton }
7878 src = { MoreVert }
7979 iconAs = { Icon }
@@ -97,7 +97,7 @@ export const HistoryLogGroupEntries = ({
9797 < HistoryCompareChangesModal
9898 isOpen = { isChangeModalOpen }
9999 onClose = { closeChangeModal }
100- usageKey = { itemId }
100+ usageKey = { itemKey }
101101 oldTitle = { changeModalData . title }
102102 oldVersion = { changeModalData . oldVersion }
103103 newVersion = { changeModalData . newVersion || 'published' }
You can’t perform that action at this time.
0 commit comments