Skip to content

Commit 306a90a

Browse files
committed
refactor: rename itemId in history log group component
1 parent 0d585e5 commit 306a90a

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/library-authoring/generic/history-log/HistoryLog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export const HistoryComponentLog = ({ componentId }: { componentId: string; }) =
5959
<div key={`${publishGroup.publishLogUuid}-${publishGroup.directPublishedEntities[0].entityKey}`}>
6060
<HistoryPublishLogGroup
6161
{...publishGroup}
62-
itemId={publishGroup.scopeEntityKey || componentId}
62+
itemKey={publishGroup.scopeEntityKey || componentId}
6363
/>
6464
</div>
6565
))
@@ -140,7 +140,7 @@ export const HistoryContainerLog = ({ containerId }: { containerId: string; }) =
140140
<div key={`${publishGroup.publishLogUuid}-${publishGroup.directPublishedEntities[0].entityKey}`}>
141141
<HistoryPublishLogGroup
142142
{...publishGroup}
143-
itemId={publishGroup.scopeEntityKey || containerId}
143+
itemKey={publishGroup.scopeEntityKey || containerId}
144144
hideLogVert={isLast && isBeforeGroup}
145145
/>
146146
</div>

src/library-authoring/generic/history-log/HistoryLogGroup.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ describe('<HistoryLogGroup />', () => {
5656
render(
5757
<HistoryPublishLogGroup
5858
{...publishGroup}
59-
itemId={mockLibraryBlockPublishHistory.usageKeyWithGroups}
59+
itemKey={mockLibraryBlockPublishHistory.usageKeyWithGroups}
6060
/>,
6161
);
6262

src/library-authoring/generic/history-log/HistoryLogGroup.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface HistoryDraftLogGroupProps {
3636
}
3737

3838
export interface HistoryPublishLogGroupProps extends LibraryPublishHistoryGroup {
39-
itemId: string;
39+
itemKey: string;
4040
// When true, hides the vertical connector line rendered below this group. Used for the last group
4141
// in the history log to avoid a dangling connector with nothing below it.
4242
hideLogVert?: boolean;
@@ -134,7 +134,7 @@ export const HistoryDraftLogGroup = ({
134134
};
135135

136136
export const HistoryPublishLogGroup = ({
137-
itemId,
137+
itemKey,
138138
publishLogUuid,
139139
directPublishedEntities,
140140
publishedBy,
@@ -148,7 +148,7 @@ export const HistoryPublishLogGroup = ({
148148
const {
149149
data: entries,
150150
isPending,
151-
} = useLibraryPublishHistoryEntries(itemId, publishLogUuid, isOpenCollapsible);
151+
} = useLibraryPublishHistoryEntries(itemKey, publishLogUuid, isOpenCollapsible);
152152

153153
const dateMessage = moment(publishedAt).fromNow();
154154
const hasContributors = contributors.length > 0;
@@ -186,7 +186,7 @@ export const HistoryPublishLogGroup = ({
186186
</div>
187187
</>
188188
) :
189-
<HistoryLogGroupEntries entries={entries ?? []} itemKey={itemId} />}
189+
<HistoryLogGroupEntries entries={entries ?? []} itemKey={itemKey} />}
190190
</Collapsible.Body>
191191
</Collapsible.Advanced>
192192
) :

0 commit comments

Comments
 (0)