You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When toggling the sidebar component, the following error appears in the console:
Uncaught Error: cookies was called outside a request scope.
Read more: https://nextjs.org/docs/messages...
at setSidebarCookieOnToggle
This error occurs because the application is still using Next.js cookie utilities (setSidebarCookieOnToggle from @webb-tools/webb-ui-components/next-utils) after migrating to Vite without SSR.
Expected Behavior
The sidebar toggle state should persist without throwing errors, using a client-side storage solution compatible with Vite/React applications (e.g., localStorage or a non-Next.js cookie solution).
Steps To Reproduce
Open the application running on Vite
Open the developer console
Click on the sidebar toggle button
Observe the error in the console
Screenshot
Anything else?
The error is occurring in apps/tangle-dapp/src/components/Sidebar/Sidebar.tsx where we're using setSidebarCookieOnToggle from Next.js utilities despite having migrated to Vite.
Is there an existing issue for this?
Current Behavior
When toggling the sidebar component, the following error appears in the console:
This error occurs because the application is still using Next.js cookie utilities (
setSidebarCookieOnToggle
from@webb-tools/webb-ui-components/next-utils
) after migrating to Vite without SSR.Expected Behavior
The sidebar toggle state should persist without throwing errors, using a client-side storage solution compatible with Vite/React applications (e.g., localStorage or a non-Next.js cookie solution).
Steps To Reproduce
Screenshot
Anything else?
The error is occurring in
apps/tangle-dapp/src/components/Sidebar/Sidebar.tsx
where we're usingsetSidebarCookieOnToggle
from Next.js utilities despite having migrated to Vite.This needs to be updated to use a Vite-compatible solution for persisting the sidebar state.
The text was updated successfully, but these errors were encountered: