mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
chore(lint): no-shadow in sidebar-workspace-list.test, use-pr-pane-data.test
This commit is contained in:
@@ -203,11 +203,11 @@ function WorkspaceRowProbe({
|
||||
workspaceId: string;
|
||||
counts: RenderCounts;
|
||||
}): null {
|
||||
const workspace = useWorkspaceFields(serverId, workspaceId, (entry) =>
|
||||
const workspaceEntry = useWorkspaceFields(serverId, workspaceId, (entry) =>
|
||||
createSidebarWorkspaceEntry({ serverId, workspace: entry }),
|
||||
);
|
||||
if (workspace) {
|
||||
incrementRecord(counts.rows, workspace.workspaceId);
|
||||
if (workspaceEntry) {
|
||||
incrementRecord(counts.rows, workspaceEntry.workspaceId);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -223,7 +223,7 @@ function ProjectActiveProbe({
|
||||
}): null {
|
||||
useIsNavigationProjectActive({
|
||||
serverId,
|
||||
workspaceIds: project.workspaces.map((workspace) => workspace.workspaceId),
|
||||
workspaceIds: project.workspaces.map((entry) => entry.workspaceId),
|
||||
});
|
||||
incrementRecord(counts.projectSelection, project.projectKey);
|
||||
return null;
|
||||
@@ -253,16 +253,16 @@ function SidebarFrameProbe({ counts }: { counts: RenderCounts }): ReactElement {
|
||||
<div key={project.projectKey}>
|
||||
<ProjectHeaderProbe project={project} counts={counts} />
|
||||
<ProjectActiveProbe serverId={SERVER_ID} project={project} counts={counts} />
|
||||
{project.workspaces.map((workspace) => (
|
||||
<React.Fragment key={workspace.workspaceKey}>
|
||||
{project.workspaces.map((entry) => (
|
||||
<React.Fragment key={entry.workspaceKey}>
|
||||
<WorkspaceRowProbe
|
||||
serverId={workspace.serverId}
|
||||
workspaceId={workspace.workspaceId}
|
||||
serverId={entry.serverId}
|
||||
workspaceId={entry.workspaceId}
|
||||
counts={counts}
|
||||
/>
|
||||
<WorkspaceSelectionProbe
|
||||
serverId={workspace.serverId}
|
||||
workspaceId={workspace.workspaceId}
|
||||
serverId={entry.serverId}
|
||||
workspaceId={entry.workspaceId}
|
||||
counts={counts}
|
||||
/>
|
||||
</React.Fragment>
|
||||
|
||||
@@ -766,9 +766,15 @@ function createDeferred<T>(): {
|
||||
return { promise, resolve };
|
||||
}
|
||||
|
||||
function countTimelineCalls({ cwd, prNumber }: { cwd: string; prNumber: number }): number {
|
||||
function countTimelineCalls({
|
||||
cwd: targetCwd,
|
||||
prNumber,
|
||||
}: {
|
||||
cwd: string;
|
||||
prNumber: number;
|
||||
}): number {
|
||||
return mockClient.pullRequestTimeline.mock.calls.filter(([input]) => {
|
||||
const request = input as { cwd?: string; prNumber?: number | null };
|
||||
return request.cwd === cwd && request.prNumber === prNumber;
|
||||
return request.cwd === targetCwd && request.prNumber === prNumber;
|
||||
}).length;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user