You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 490B

12345678910111213141516171819202122232425
  1. import nookies from 'nookies';
  2. import CheckoutContent from '../../components/checkout-content/CheckoutContent';
  3. const CheckoutPage = () => {
  4. return <CheckoutContent></CheckoutContent>;
  5. };
  6. export const getServerSideProps = async (ctx) => {
  7. const cookies = nookies.get(ctx);
  8. if (!cookies['checkout-session']) {
  9. return {
  10. redirect: {
  11. destination: '/cart',
  12. permanent: false,
  13. },
  14. };
  15. }
  16. return {
  17. props: {},
  18. };
  19. };
  20. export default CheckoutPage;