mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-14 17:02:49 +03:00
console: fix telemetry notification reappearing
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/7781 GitOrigin-RevId: 33c7873f8f9ff950cb7d45adf7b26b352f7fe1ae
This commit is contained in:
parent
c27dceb1df
commit
825e5206b4
@ -6,7 +6,10 @@ import { hot } from 'react-hot-loader';
|
||||
import { ThemeProvider } from 'styled-components';
|
||||
import 'react-loading-skeleton/dist/skeleton.css';
|
||||
import ErrorBoundary from '../Error/ErrorBoundary';
|
||||
import { telemetryNotificationShown } from '../../telemetry/Actions';
|
||||
import {
|
||||
telemetryNotificationShown,
|
||||
setTelemetryNotificationShownInDB,
|
||||
} from '../../telemetry/Actions';
|
||||
import { showTelemetryNotification } from '../../telemetry/Notifications';
|
||||
import globals from '../../Globals';
|
||||
import styles from './App.module.scss';
|
||||
@ -57,6 +60,7 @@ const App = ({
|
||||
telemetryShown.current = true;
|
||||
dispatch(showTelemetryNotification());
|
||||
dispatch(telemetryNotificationShown());
|
||||
dispatch(setTelemetryNotificationShownInDB());
|
||||
}
|
||||
}, [dispatch, telemetry, isContextCloud]);
|
||||
|
||||
|
@ -2,15 +2,8 @@ import React from 'react';
|
||||
import { AnyAction } from 'redux';
|
||||
import { ThunkDispatch } from 'redux-thunk';
|
||||
import { showNotification } from '../components/Services/Common/Notification';
|
||||
import { setTelemetryNotificationShownInDB } from './Actions';
|
||||
import { ReduxState } from '../types';
|
||||
|
||||
const onRemove = () => {
|
||||
return (dispatch: ThunkDispatch<ReduxState, unknown, AnyAction>) => {
|
||||
dispatch(setTelemetryNotificationShownInDB());
|
||||
};
|
||||
};
|
||||
|
||||
const showTelemetryNotification = () => {
|
||||
return (dispatch: ThunkDispatch<ReduxState, unknown, AnyAction>) => {
|
||||
dispatch(
|
||||
@ -35,7 +28,6 @@ const showTelemetryNotification = () => {
|
||||
to read more or to opt-out.
|
||||
</div>
|
||||
),
|
||||
onRemove: () => dispatch(onRemove()),
|
||||
},
|
||||
'info'
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user