- Are you sure you want to overwrite this dataset?
+ >
+ }
+ >
+
+ {!shouldOverwriteDataset && (
+
+
+ Save this query as virtual dataset to continue exploring.
- )}
-
-
- );
-};
+
+
+ Save as new
+
+
+
+ Overwrite existing
+
+
+
+
+ )}
+ {shouldOverwriteDataset && (
+
+ Are you sure you want to overwrite this dataset?
+
+ )}
+
+
+);
diff --git a/superset-frontend/src/SqlLab/components/SaveQuery.tsx b/superset-frontend/src/SqlLab/components/SaveQuery.tsx
index 997203e220816..04dc673b84740 100644
--- a/superset-frontend/src/SqlLab/components/SaveQuery.tsx
+++ b/superset-frontend/src/SqlLab/components/SaveQuery.tsx
@@ -79,13 +79,11 @@ export default function SaveQuery({
const [showSave, setShowSave] = useState
(false);
const isSaved = !!query.remoteId;
- const queryPayload = () => {
- return {
- ...query,
- title: label,
- description,
- };
- };
+ const queryPayload = () => ({
+ ...query,
+ title: label,
+ description,
+ });
const close = () => {
setShowSave(false);
@@ -113,47 +111,45 @@ export default function SaveQuery({
setShowSave(!showSave);
};
- const renderModalBody = () => {
- return (
-
-
-
-
- {t('Name')}
-
-
-
-
-
-
-
-
- {t('Description')}
-
-
-
-
- {saveQueryWarning && (
- <>
+ const renderModalBody = () => (
+
+
+
+
+ {t('Name')}
+
+
+
+
+
+
+
+
+ {t('Description')}
+
+
+
+
+ {saveQueryWarning && (
+ <>
+
+
+
+
+ {saveQueryWarning}
+
+
-
-
-
- {saveQueryWarning}
-
-
-
-
- >
- )}
-
- );
- };
+
+ >
+ )}
+
+ );
return (
diff --git a/superset-frontend/src/chart/chartAction.js b/superset-frontend/src/chart/chartAction.js
index 4d3c3f4418d2e..802208e451b49 100644
--- a/superset-frontend/src/chart/chartAction.js
+++ b/superset-frontend/src/chart/chartAction.js
@@ -148,13 +148,13 @@ const legacyChartDataRequest = async (
'GET' && isFeatureEnabled(FeatureFlag.CLIENT_CACHE)
? SupersetClient.get
: SupersetClient.post;
- return clientMethod(querySettings).then(({ json }) => {
+ return clientMethod(querySettings).then(({ json }) =>
// Make the legacy endpoint return a payload that corresponds to the
// V1 chart data endpoint response signature.
- return {
+ ({
result: [json],
- };
- });
+ }),
+ );
};
const v1ChartDataRequest = async (
@@ -195,9 +195,7 @@ const v1ChartDataRequest = async (
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload),
};
- return SupersetClient.post(querySettings).then(({ json }) => {
- return json;
- });
+ return SupersetClient.post(querySettings).then(({ json }) => json);
};
export async function getChartDataRequest({
diff --git a/superset-frontend/src/components/ErrorMessage/types.ts b/superset-frontend/src/components/ErrorMessage/types.ts
index 40aa6b6bef781..7843ff394b2c1 100644
--- a/superset-frontend/src/components/ErrorMessage/types.ts
+++ b/superset-frontend/src/components/ErrorMessage/types.ts
@@ -70,6 +70,4 @@ export type ErrorMessageComponentProps<
source?: ErrorSource;
};
-export type ErrorMessageComponent = React.ComponentType<
- ErrorMessageComponentProps
->;
+export type ErrorMessageComponent = React.ComponentType;
diff --git a/superset-frontend/src/components/FacePile/FacePile.stories.tsx b/superset-frontend/src/components/FacePile/FacePile.stories.tsx
index d524cf758e35f..aa0d998497079 100644
--- a/superset-frontend/src/components/FacePile/FacePile.stories.tsx
+++ b/superset-frontend/src/components/FacePile/FacePile.stories.tsx
@@ -55,6 +55,6 @@ const users = [...new Array(10)].map((_, i) => ({
id: i,
}));
-export const SupersetFacePile = () => {
- return ;
-};
+export const SupersetFacePile = () => (
+
+);
diff --git a/superset-frontend/src/components/Icon/icon.stories.jsx b/superset-frontend/src/components/Icon/icon.stories.jsx
index b6a04d212a535..fbe09516c1732 100644
--- a/superset-frontend/src/components/Icon/icon.stories.jsx
+++ b/superset-frontend/src/components/Icon/icon.stories.jsx
@@ -61,26 +61,24 @@ const IconBlock = styled.div`
}
`;
-export const SupersetIcon = () => {
- return (
-
- {Object.keys(iconsRegistry)
- .sort()
- .map(iconName => (
-
-
- {iconName}
-
- ))}
-
- );
-};
+export const SupersetIcon = () => (
+
+ {Object.keys(iconsRegistry)
+ .sort()
+ .map(iconName => (
+
+
+ {iconName}
+
+ ))}
+
+);
diff --git a/superset-frontend/src/components/ListView/CardCollection.tsx b/superset-frontend/src/components/ListView/CardCollection.tsx
index 9e9e268fc99df..a0a0a98ce9a1e 100644
--- a/superset-frontend/src/components/ListView/CardCollection.tsx
+++ b/superset-frontend/src/components/ListView/CardCollection.tsx
@@ -68,9 +68,9 @@ export default function CardCollection({
{loading &&
rows.length === 0 &&
- [...new Array(25)].map((e, i) => {
- return {renderCard({ loading })}
;
- })}
+ [...new Array(25)].map((e, i) => (
+ {renderCard({ loading })}
+ ))}
{rows.length > 0 &&
rows.map(row => {
if (!renderCard) return null;
diff --git a/superset-frontend/src/components/ListView/ListView.tsx b/superset-frontend/src/components/ListView/ListView.tsx
index 3f664f1f238ea..6ee998cc3560d 100644
--- a/superset-frontend/src/components/ListView/ListView.tsx
+++ b/superset-frontend/src/components/ListView/ListView.tsx
@@ -174,34 +174,32 @@ const ViewModeToggle = ({
}: {
mode: 'table' | 'card';
setMode: (mode: 'table' | 'card') => void;
-}) => {
- return (
-
- {
- e.currentTarget.blur();
- setMode('card');
- }}
- className={cx('toggle-button', { active: mode === 'card' })}
- >
-
-
- {
- e.currentTarget.blur();
- setMode('table');
- }}
- className={cx('toggle-button', { active: mode === 'table' })}
- >
-
-
-
- );
-};
+}) => (
+
+ {
+ e.currentTarget.blur();
+ setMode('card');
+ }}
+ className={cx('toggle-button', { active: mode === 'card' })}
+ >
+
+
+ {
+ e.currentTarget.blur();
+ setMode('table');
+ }}
+ className={cx('toggle-button', { active: mode === 'table' })}
+ >
+
+
+
+);
export interface ListViewProps {
columns: any[];
diff --git a/superset-frontend/src/components/ListViewCard/ListViewCard.stories.tsx b/superset-frontend/src/components/ListViewCard/ListViewCard.stories.tsx
index 6daf43d5fd00b..5f716c01f8d48 100644
--- a/superset-frontend/src/components/ListViewCard/ListViewCard.stories.tsx
+++ b/superset-frontend/src/components/ListViewCard/ListViewCard.stories.tsx
@@ -41,49 +41,43 @@ const imgFallbackKnob = {
defaultValue: DashboardImg,
};
-export const SupersetListViewCard = () => {
- return (
-
-
-
-
- Delete
-
-
- Edit
-
-
- }
- >
-
-
-
- }
- />
- );
-};
+export const SupersetListViewCard = () => (
+
+
+
+
+ Delete
+
+
+ Edit
+
+
+ }
+ >
+
+
+
+ }
+ />
+);
diff --git a/superset-frontend/src/components/Select/Select.stories.tsx b/superset-frontend/src/components/Select/Select.stories.tsx
index 74ae743a79640..dc10420346b73 100644
--- a/superset-frontend/src/components/Select/Select.stories.tsx
+++ b/superset-frontend/src/components/Select/Select.stories.tsx
@@ -49,45 +49,43 @@ export default {
},
};
-export const SelectGallery = ({ value }: { value: OptionTypeBase }) => {
- return (
- <>
- With default value
-