import {useShopStore} from "./shop_store"; import {useClickAway} from "./options/useClickAway"; import {Modal} from "react-bootstrap"; import {Validation} from "./validate"; import React from "react"; export function RFQFeedback() { const {closeRFQ, shouldShow, status} = useShopStore(state => ({ closeRFQ: state.closeRFQFeedback, shouldShow: state.shouldShowRFQFeedback, status: state.processingResult })) const ref = useClickAway((e) => { if (e.type === "mousedown") // ignore touchstart closeRFQ() }); return (
{status.status === Validation.OK ? close : close }
{status.message}
) }