Skip to content

Commit

Permalink
fix: Duplicated toast messages (#27135)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-s-molina committed Feb 16, 2024
1 parent 1ff4f79 commit cf33a62
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 98 deletions.
4 changes: 0 additions & 4 deletions superset-frontend/src/SqlLab/reducers/getInitialState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
* under the License.
*/
import { t } from '@superset-ui/core';
import getToastsFromPyFlashMessages from 'src/components/MessageToasts/getToastsFromPyFlashMessages';
import type { BootstrapData } from 'src/types/bootstrapTypes';
import type { InitialState } from 'src/hooks/apiResources/sqlLab';
import {
Expand Down Expand Up @@ -245,9 +244,6 @@ export default function getInitialState({
queryCostEstimates: {},
unsavedQueryEditor,
},
messageToasts: getToastsFromPyFlashMessages(
(common || {})?.flash_messages || [],
),
localStorageUsageInKilobytes: 0,
common,
...otherBootstrapData,
Expand Down

This file was deleted.

This file was deleted.

2 changes: 0 additions & 2 deletions superset-frontend/src/dashboard/components/Dashboard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,11 @@ const propTypes = {
ownDataCharts: PropTypes.object.isRequired,
layout: PropTypes.object.isRequired,
impressionId: PropTypes.string.isRequired,
initMessages: PropTypes.array,
timeout: PropTypes.number,
userId: PropTypes.string,
};

const defaultProps = {
initMessages: [],
timeout: 60,
userId: '',
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ describe('Dashboard', () => {
triggerQuery() {},
logEvent() {},
},
initMessages: [],
dashboardState,
dashboardInfo,
charts: chartQueries,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ const initialState: { dashboardInfo: DashboardInfo } = {
filterBarOrientation: FilterBarOrientation.Vertical,
common: {
conf: {},
flash_messages: [],
},
crossFiltersEnabled: true,
},
Expand Down
1 change: 0 additions & 1 deletion superset-frontend/src/dashboard/containers/Dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ function mapStateToProps(state: RootState) {
} = state;

return {
initMessages: dashboardInfo.common?.flash_messages,
timeout: dashboardInfo.common?.conf?.SUPERSET_WEBSERVER_TIMEOUT,
userId: dashboardInfo.userId,
dashboardInfo,
Expand Down
1 change: 0 additions & 1 deletion superset-frontend/src/dashboard/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ export type DashboardState = {
export type DashboardInfo = {
id: number;
common: {
flash_messages: string[];
conf: JsonObject;
};
userId: string;
Expand Down

0 comments on commit cf33a62

Please sign in to comment.