Im trying to get cookies on client side getCookie
from cookies-next
, and im facing issue that on initial render next.js is crashing with error Cannot read properties of undefined
, but in console cookie has some value always.
When im trying to pass cookie from server using getServerSideProps
, i get error from eslint
Async arrow function 'getServerSideProps' has no 'await' expression.
and when i remove async
i get ts
error getServerSideProps should return promise<...>
etc