@shopgate/engage
Version:
Shopgate's ENGAGE library.
31 lines (30 loc) • 1.01 kB
JavaScript
import React, { useContext } from 'react';
import { i18n } from "../../../core/helpers/i18n";
import { FulfillmentContext } from "../../locations.context";
import { container, heading, body, orderNum } from "./ReservationResponse.style";
/**
* Renders the reservation success screen.
* @returns {JSX}
*/
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
export function ReservationSuccess() {
const {
orderNumbers
} = useContext(FulfillmentContext);
return /*#__PURE__*/_jsxs("div", {
className: container,
children: [/*#__PURE__*/_jsx("h2", {
className: heading,
children: i18n.text('locations.success_title')
}), /*#__PURE__*/_jsx("p", {
className: body,
children: i18n.text('locations.success_copy')
}), /*#__PURE__*/_jsx("p", {
className: body,
children: i18n.text('locations.success_order_num')
}), orderNumbers !== null && /*#__PURE__*/_jsx("p", {
className: orderNum,
children: orderNumbers[0]
})]
});
}