feature/IO-3103-Ant5-Notifications
This commit is contained in:
@@ -6,6 +6,7 @@ import { createStructuredSelector } from "reselect";
|
||||
import { setEmailOptions } from "../../redux/email/email.actions";
|
||||
import { GenerateDocument } from "../../utils/RenderTemplate";
|
||||
import { TemplateList } from "../../utils/TemplateConstants";
|
||||
import { useNotification } from "../../contexts/Notifications/notificationContext.jsx";
|
||||
|
||||
const mapStateToProps = createStructuredSelector({});
|
||||
|
||||
@@ -15,6 +16,7 @@ const mapDispatchToProps = (dispatch) => ({
|
||||
|
||||
export function ChatPrintButton({ conversation }) {
|
||||
const [loading, setLoading] = useState(false);
|
||||
const notification = useNotification();
|
||||
|
||||
const generateDocument = (type) => {
|
||||
setLoading(true);
|
||||
@@ -27,7 +29,8 @@ export function ChatPrintButton({ conversation }) {
|
||||
subject: TemplateList("messaging").conversation_list.subject
|
||||
},
|
||||
type,
|
||||
conversation.id
|
||||
conversation.id,
|
||||
notification
|
||||
).catch((e) => {
|
||||
console.warn("Something went wrong generating a document.");
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user