diff --git a/pages/index.tsx b/pages/index.tsx index 7d23ebadd..cc77bafca 100644 --- a/pages/index.tsx +++ b/pages/index.tsx @@ -1,17 +1,20 @@ import { Layout } from 'src/components/common'; import { HomeBanner, HomeCategories, HomeCollection, HomeCTA, HomeFeature, HomeRecipe, HomeSubscribe, HomeVideo } from 'src/components/modules/home'; +import Test from './test'; export default function Home() { return ( <> - + + + {/* - + */} {/* // todo: uncomment */} {/* */} diff --git a/pages/test.tsx b/pages/test.tsx index 0e95fddf6..73945053e 100644 --- a/pages/test.tsx +++ b/pages/test.tsx @@ -1,23 +1,13 @@ import { useState } from 'react' -import { - ButtonCommon, - Layout, ModalInfo -} from 'src/components/common' +import { ButtonCommon, Layout, ModalInfo } from 'src/components/common' + +import CheckoutSuccess from 'src/components/modules/checkout/CheckoutSuccess/CheckoutSuccess' export default function Test() { - const [visible, setVisible] = useState(false) - const onClose = () => { - setVisible(false) - } - const onOpen = () => { - setVisible(true) - } + return ( <> - open - - Lorem, ipsum dolor sit amet consectetur adipisicing elit. Nisi qui, esse eos nobis soluta suscipit aliquid nostrum corporis. Nihil eligendi similique recusandae minus mollitia aliquam, molestias fugit tenetur voluptatibus maiores et. Quaerat labore corporis inventore nostrum, amet autem exercitationem eligendi? - + ) } diff --git a/src/components/common/Layout/Layout.tsx b/src/components/common/Layout/Layout.tsx index 17f520185..18fa73b33 100644 --- a/src/components/common/Layout/Layout.tsx +++ b/src/components/common/Layout/Layout.tsx @@ -15,24 +15,24 @@ interface Props { // note: demo code const Layout: FC = ({ children }) => { const { locale = 'en-US' } = useRouter() - const { visible: visibleCartDrawer, openModal, closeModal: closeCartDrawer } = useModalCommon({ initialValue: false }) + // const { visible: visibleCartDrawer, openModal, closeModal: closeCartDrawer } = useModalCommon({ initialValue: false }) - const toggle = () => { - if (visibleCartDrawer) { - closeCartDrawer() - } else { - openModal() - } - } + // const toggle = () => { + // if (visibleCartDrawer) { + // closeCartDrawer() + // } else { + // openModal() + // } + // } return (
{children}
- - toggle card: {visibleCartDrawer.toString()} */} + {/* + onClose={closeCartDrawer} /> */}
diff --git a/src/components/modules/checkout/CheckoutSuccess/CheckoutSuccess.module.scss b/src/components/modules/checkout/CheckoutSuccess/CheckoutSuccess.module.scss new file mode 100644 index 000000000..73f69f7bf --- /dev/null +++ b/src/components/modules/checkout/CheckoutSuccess/CheckoutSuccess.module.scss @@ -0,0 +1,48 @@ +@import '../../../../styles/utilities'; + +.checkoutSuccessWrapper { + @apply flex items-center justify-center; + margin-top: -3.2rem; + + .checkoutSuccess { + border-radius: 80% 90% 18% 10% / 20% 10% 27% 20%; + max-width: 77.6rem; + height: fit-content; + background: + url('./assets/veget.png') left 0 top 0 no-repeat, + url('./assets/fish.png') right 0 top 0 no-repeat, + url('./assets/freezeShrimp.png') right 0 bottom 0 no-repeat, + url('./assets/coffeeBean.png') left 0 bottom 0 no-repeat; + background-color: #E3F2E9; + + .checkoutContent { + @apply text-center; + margin: 7.2rem 4.8rem 6.4rem 4.8rem; + + .checkoutMsg { + @apply heading-1 font-heading; + margin-top: 3.2rem; + margin-bottom: 1.6rem; + } + + .checkoutSubMsg { + @apply sub-headline; + margin-bottom: 4rem; + } + + .backToHomeBtn { + @apply flex cursor-pointer font-bold items-center justify-center; + color: white; + background-color: var(--primary); + margin: auto; + // border-radius: 80% 90% 18% 10% / 20% 10% 27% 20%; // to do + width: fit-content; + padding: 1.6rem 3.2rem 1.6rem 3.2rem; + + .arrowRight { + margin-left: 1.4rem; + } + } + } + } +} \ No newline at end of file diff --git a/src/components/modules/checkout/CheckoutSuccess/CheckoutSuccess.tsx b/src/components/modules/checkout/CheckoutSuccess/CheckoutSuccess.tsx new file mode 100644 index 000000000..23f98046e --- /dev/null +++ b/src/components/modules/checkout/CheckoutSuccess/CheckoutSuccess.tsx @@ -0,0 +1,46 @@ +import React from "react"; +import s from './CheckoutSuccess.module.scss'; + +import Image from "next/image"; +import Link from "next/link"; + +import checkIcon from './assets/checkIcon.png'; + +const CheckoutSuccess = () => { + + return ( +
+
+
+
+ check icon +
+ +
Your purchase has been successed!
+
Last call! Shop deep deals on 100+ bulk picks while you can.
+ + +
+ +
+ + +
+ +
+
+ ) +} + +export default CheckoutSuccess \ No newline at end of file diff --git a/src/components/modules/checkout/CheckoutSuccess/assets/checkIcon.png b/src/components/modules/checkout/CheckoutSuccess/assets/checkIcon.png new file mode 100644 index 000000000..9d97234fb Binary files /dev/null and b/src/components/modules/checkout/CheckoutSuccess/assets/checkIcon.png differ diff --git a/src/components/modules/checkout/CheckoutSuccess/assets/coffeeBean.png b/src/components/modules/checkout/CheckoutSuccess/assets/coffeeBean.png new file mode 100644 index 000000000..742f30b68 Binary files /dev/null and b/src/components/modules/checkout/CheckoutSuccess/assets/coffeeBean.png differ diff --git a/src/components/modules/checkout/CheckoutSuccess/assets/fish.png b/src/components/modules/checkout/CheckoutSuccess/assets/fish.png new file mode 100644 index 000000000..14f676f64 Binary files /dev/null and b/src/components/modules/checkout/CheckoutSuccess/assets/fish.png differ diff --git a/src/components/modules/checkout/CheckoutSuccess/assets/freezeShrimp.png b/src/components/modules/checkout/CheckoutSuccess/assets/freezeShrimp.png new file mode 100644 index 000000000..5b3a501ac Binary files /dev/null and b/src/components/modules/checkout/CheckoutSuccess/assets/freezeShrimp.png differ diff --git a/src/components/modules/checkout/CheckoutSuccess/assets/veget.png b/src/components/modules/checkout/CheckoutSuccess/assets/veget.png new file mode 100644 index 000000000..83b8f51cc Binary files /dev/null and b/src/components/modules/checkout/CheckoutSuccess/assets/veget.png differ