Toaster (Sonner) losing styles after navigating back from Error boundary #9318
Answered
by
merthanmerter
merthanmerter
asked this question in
Q&A
-
I am using sonner with session storage in my app, it works fine unless user navigates to an error page and navigates back (from history). then sonner loses styles until refreshing the page. no matter what I tried, couldn't figure out why. any help will be appreciated. below my root.tsx
and toaster component;
|
Beta Was this translation helpful? Give feedback.
Answered by
merthanmerter
Apr 26, 2024
Replies: 1 comment
-
I was able to solve it with following steps; copy style.css from sonner repo and add it to your project e.g.
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
merthanmerter
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was able to solve it with following steps;
copy style.css from sonner repo and add it to your project e.g.
./styles/sonner.css
add following code to your root.tsx file to import styles using links function;