Encountered an unusual issue with Next.js. My background linear gradients are not loading properly when navigating between pages.
The link in question is:
import Link from 'next/link'
<Link href='/register'>
<a> click me </a>
</Link>
In my code, I have a div with the following style:
style={{
background: 'linear-gradient(153.68deg, #17191D 0%, #0C152C 45.82%);',
}}
Strangely, when clicking the link, the linear gradient fails to load and the background appears as plain white. However, upon refreshing the page, the linear gradient works as intended.
*Additionally, I am using Tailwind CSS. When I apply the following class:
className='bg-gradient-to-r from-cyan-500 to-blue-500'
instead of directly styling the background property, the linear gradient displays correctly while navigating with the link.
Any assistance on how to make the style background property work would be highly appreciated!