mirror of
https://github.com/apache/superset.git
synced 2026-04-23 01:55:09 +00:00
chore: Remove actions prop and refactor code in SQL Lab (#22231)
This commit is contained in:
@@ -20,16 +20,8 @@ import React from 'react';
|
||||
import { render, screen } from 'spec/helpers/testing-library';
|
||||
import QueryHistory from 'src/SqlLab/components/QueryHistory';
|
||||
|
||||
const NOOP = () => {};
|
||||
const mockedProps = {
|
||||
queries: [],
|
||||
actions: {
|
||||
queryEditorSetAndSaveSql: NOOP,
|
||||
cloneQueryToNewTab: NOOP,
|
||||
fetchQueryResults: NOOP,
|
||||
clearQueryResults: NOOP,
|
||||
removeQuery: NOOP,
|
||||
},
|
||||
displayLimit: 1000,
|
||||
latestQueryId: 'yhMUZCGb',
|
||||
};
|
||||
|
||||
@@ -23,13 +23,6 @@ import QueryTable from 'src/SqlLab/components/QueryTable';
|
||||
|
||||
interface QueryHistoryProps {
|
||||
queries: QueryResponse[];
|
||||
actions: {
|
||||
queryEditorSetAndSaveSql: Function;
|
||||
cloneQueryToNewTab: Function;
|
||||
fetchQueryResults: Function;
|
||||
clearQueryResults: Function;
|
||||
removeQuery: Function;
|
||||
};
|
||||
displayLimit: number;
|
||||
latestQueryId: string | undefined;
|
||||
}
|
||||
@@ -47,7 +40,6 @@ const StyledEmptyStateWrapper = styled.div`
|
||||
|
||||
const QueryHistory = ({
|
||||
queries,
|
||||
actions,
|
||||
displayLimit,
|
||||
latestQueryId,
|
||||
}: QueryHistoryProps) =>
|
||||
@@ -64,7 +56,6 @@ const QueryHistory = ({
|
||||
'actions',
|
||||
]}
|
||||
queries={queries}
|
||||
actions={actions}
|
||||
displayLimit={displayLimit}
|
||||
latestQueryId={latestQueryId}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user