suddjian commented on a change in pull request #13220:
URL: https://github.com/apache/superset/pull/13220#discussion_r579488817
##########
File path: superset-frontend/src/components/FlashProvider/index.tsx
##########
@@ -17,16 +17,15 @@
* under the License.
*/
import React from 'react';
-import withToasts from 'src/messageToasts/enhancers/withToasts';
+import { useToasts } from 'src/messageToasts/enhancers/withToasts';
+import { useComponentDidMount } from 'src/common/hooks/useComponentDidMount';
-type Message = Array<string>;
+type FlashMessageType = 'info' | 'alert' | 'danger' | 'warning' | 'success';
+export type FlashMessage = [FlashMessageType, string];
-interface CommonObject {
- flash_messages: Array<Message>;
-}
interface Props {
- children: Node;
- common: CommonObject;
+ children: JSX.Element;
+ messages: FlashMessage[];
Review comment:
Good idea to take `messages` instead of `common`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]