- {contentArray.map((entry) =>
)}
+ {contentArray.map((entry) => (
+
+ ))}
);
}
function Button({href, text, buttonClass, onClick}) {
return (
-
- {
- contentArray.map((entry, index) =>
-
- )
- }
+ {contentArray.map((entry, index) => (
+
+ ))}
);
}
-export default function OrderPrintCopy({amazonDataLink, hideDialog}) {
- const { formatMessage } = useIntl();
- const contentArray = React.useMemo(
- () => {
- const individual = formatMessage({
- id: 'printcopy.individual',
- defaultMessage: 'Individual'
- });
- const bookstore = formatMessage({
- id: 'printcopy.bookstore',
- defaultMessage: 'Bookstore'
- });
- const disclosure = formatMessage({
- id: 'printcopy.disclosure',
- defaultMessage: '***'
- });
- const button1Text = formatMessage({
- id: 'printcopy.button1',
- defaultMessage: 'Order a personal copy'
- });
- const button2Text = formatMessage({
- id: 'printcopy.button2',
- defaultMessage: 'Order options'
- });
+export default function OrderPrintCopy({slug}) {
+ const amazonDataLink = useAmazonAssociatesLink(slug);
+ const {formatMessage} = useIntl();
+ const {iframe} = useDetailsContext();
+
+ const iframeCode = React.useMemo(
+ () => iframe.length > 0 ? (`
+ ${iframe}
+