From ec707a8e5356e62a3b68dc0d5403c228765f2e37 Mon Sep 17 00:00:00 2001 From: Alex Vuong Date: Fri, 15 Jul 2022 17:07:21 -0700 Subject: [PATCH 1/4] fix checkout header logo navigation --- .../app/components/_app/index.jsx | 2 +- .../checkout/partials/checkout-header.jsx | 30 +++++++++++++------ 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/packages/template-retail-react-app/app/components/_app/index.jsx b/packages/template-retail-react-app/app/components/_app/index.jsx index 24d14d7282..14ccd686c2 100644 --- a/packages/template-retail-react-app/app/components/_app/index.jsx +++ b/packages/template-retail-react-app/app/components/_app/index.jsx @@ -230,7 +230,7 @@ const App = (props) => { ) : ( - + )} diff --git a/packages/template-retail-react-app/app/pages/checkout/partials/checkout-header.jsx b/packages/template-retail-react-app/app/pages/checkout/partials/checkout-header.jsx index 9b8f9e79f4..ed624ee348 100644 --- a/packages/template-retail-react-app/app/pages/checkout/partials/checkout-header.jsx +++ b/packages/template-retail-react-app/app/pages/checkout/partials/checkout-header.jsx @@ -5,25 +5,33 @@ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ import React from 'react' -import {FormattedMessage} from 'react-intl' -import {Badge, Box, Button, Flex, Center} from '@chakra-ui/react' +import PropTypes from 'prop-types' +import {FormattedMessage, useIntl} from 'react-intl' +import {Badge, Box, Button, Flex, Center, IconButton, useMultiStyleConfig} from '@chakra-ui/react' import useBasket from '../../../commerce-api/hooks/useBasket' import Link from '../../../components/link' import {BasketIcon, BrandLogo} from '../../../components/icons' +import {noop} from '../../../utils/utils' -const CheckoutHeader = () => { +const CheckoutHeader = ({onLogoClick = noop()}) => { const basket = useBasket() + const intl = useIntl() + const styles = useMultiStyleConfig('Header') return ( - - - + } + {...styles.icons} + variant="unstyled" + onClick={onLogoClick} + />