Du kannst nicht mehr als 25 Themen auswählen Themen müssen mit entweder einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.

index.tsx 768B

1234567891011121314151617181920212223242526272829303132
  1. import { NextPage, GetServerSideProps } from 'next';
  2. import { serverSideTranslations } from 'next-i18next/serverSideTranslations';
  3. import nookies from 'nookies';
  4. import CheckoutContent from '../../components/checkout-content/CheckoutContent';
  5. const CheckoutPage: NextPage = () => {
  6. return <CheckoutContent></CheckoutContent>;
  7. };
  8. export const getServerSideProps: GetServerSideProps = async (ctx: any) => {
  9. const cookies = nookies.get(ctx);
  10. if (!cookies['checkout-session']) {
  11. return {
  12. redirect: {
  13. destination: '/cart',
  14. permanent: false,
  15. },
  16. };
  17. }
  18. return {
  19. props: {
  20. ...(await serverSideTranslations(ctx.locale, [
  21. 'checkout',
  22. 'addressForm',
  23. ])),
  24. },
  25. };
  26. };
  27. export default CheckoutPage;