Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

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