chore: Use queryEditorId in SqlEditor child components (#21650)

This commit is contained in:
EugeneTorap
2022-11-16 16:06:20 +03:00
committed by GitHub
parent 2f0d5f16f3
commit d76f305343
17 changed files with 240 additions and 254 deletions

View File

@@ -27,7 +27,7 @@ import { getClientErrorObject } from 'src/utils/getClientErrorObject';
import { FeatureFlag, isFeatureEnabled } from 'src/featureFlags';
import useQueryEditor from 'src/SqlLab/hooks/useQueryEditor';
interface ShareSqlLabQueryPropTypes {
interface ShareSqlLabQueryProps {
queryEditorId: string;
addDangerToast: (msg: string) => void;
}
@@ -42,10 +42,10 @@ const StyledIcon = styled(Icons.Link)`
}
`;
function ShareSqlLabQuery({
const ShareSqlLabQuery = ({
queryEditorId,
addDangerToast,
}: ShareSqlLabQueryPropTypes) {
}: ShareSqlLabQueryProps) => {
const theme = useTheme();
const { dbId, name, schema, autorun, sql, remoteId, templateParams } =
@@ -126,6 +126,6 @@ function ShareSqlLabQuery({
)}
</>
);
}
};
export default withToasts(ShareSqlLabQuery);