Skip to content

Commit 0ce2f09

Browse files
committed
fix: add props
1 parent c797a88 commit 0ce2f09

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/containers/Tenant/Diagnostics/Diagnostics.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ const b = cn('kv-tenant-diagnostics');
5050
function Diagnostics(props: DiagnosticsProps) {
5151
const {path, database, type, subType} = useCurrentSchema();
5252
const containerRef = React.useRef<HTMLDivElement>(null);
53-
5453
const dispatch = useTypedDispatch();
5554
const {diagnosticsTab = TENANT_DIAGNOSTICS_TABS_IDS.overview} = useTypedSelector(
5655
(state) => state.tenant,
@@ -165,7 +164,10 @@ function Diagnostics(props: DiagnosticsProps) {
165164
return <Operations database={tenantName} />;
166165
}
167166
case TENANT_DIAGNOSTICS_TABS_IDS.backups: {
168-
return uiFactory.renderBackups?.();
167+
return uiFactory.renderBackups?.({
168+
database: tenantName,
169+
scrollContainerRef: containerRef,
170+
});
169171
}
170172
default: {
171173
return <div>No data...</div>;

src/uiFactory/types.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ export interface UIFactory<H extends string = CommonIssueType> {
3030
getDatabaseLinks?: GetDatabaseLinks;
3131
getClusterLinks?: GetClusterLinks;
3232

33-
renderBackups?: () => React.ReactNode;
33+
renderBackups?: (props: {
34+
database: string;
35+
scrollContainerRef: React.RefObject<HTMLDivElement>;
36+
}) => React.ReactNode;
3437

3538
healthcheck: {
3639
getHealthckechViewTitles: GetHealthcheckViewTitles<H>;

0 commit comments

Comments
 (0)