fix(dashboard-scene): fix TypeScript errors in ExportToRepository
- Return empty fragment instead of null for non-DashboardScene - Remove property from selectedItems (not in type) - Use meta.folderUid instead of state.uid for folderUid prop
This commit is contained in:
@@ -15,7 +15,7 @@ export class ExportToRepository extends ShareExportTab {
|
||||
function ExportToRepositoryRenderer({ model }: SceneComponentProps<ExportToRepository>) {
|
||||
const dashboard = model.getRoot();
|
||||
if (!(dashboard instanceof DashboardScene)) {
|
||||
return null;
|
||||
return <></>;
|
||||
}
|
||||
|
||||
return (
|
||||
@@ -24,7 +24,6 @@ function ExportToRepositoryRenderer({ model }: SceneComponentProps<ExportToRepos
|
||||
selectedItems={{
|
||||
dashboard: dashboard.state.uid ? { [dashboard.state.uid]: true } : {},
|
||||
folder: {},
|
||||
$all: false,
|
||||
}}
|
||||
onDismiss={model.useState().onDismiss}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user