Hard refresh is ugly
Hard refreshing the page shows a very unformatted page until it loads. Is there any way to prevent this? Using tailwindcss and nextjs13 with antd
![No description](https://cdn.answeroverflow.com/1189662349427216424/Screenshot_2023-12-27_at_3.08.53_PM.png)
2 Replies
Hi @synisme. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
This issue might be related to the way Next.js and Ant Design are configured in your project. It's possible that the styles are not being properly applied during server-side rendering, which could cause a flash of unstyled content when the page is hard refreshed.
One possible solution could be to follow the instructions provided in the Ant Design documentation on how to use it with Next.js. You can find the relevant guide here (https://ant.design/docs/react/use-with-next#using-pages-router).
Additionally, you might want to check your
_app.tsx
file and ensure that it's properly set up. Here's an example of how it could look like:
(Source: Refine Documentation (https://refine.dev/docs/ui-integrations/ant-design/introduction#predefined-components-and-views))
Please note that this is just a general guide and you might need to adjust the code to fit your specific needs. If the issue persists, it might be a good idea to ask for help in the Refine Discord community (https://discord.com/channels/837692625737613362/1164544118932906065) or open an issue in the Refine GitHub repository (https://github.com/refinedev/refine/issues).
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@183085423604662273> kapa.ai is still learning and improving, please let us know how it did by reacting below