I have an issue that, on refresh, some of the media disappear (bg image + logo). The backgroud image is inherited from HTML and the logo from the Navbar component.
This link is on a category and is working fine on refresh.
https://alphamedical.netlify.app/ATI
If you click on an item from that category and after that you refresh, the bg and logo disappear. https://alphamedical.netlify.app/ATI/HAMILTON-C1
For example link above.
I think it may be related with react router.
My App routes
function App() {
const customHistory = createBrowserHistory();
return (
<Router history={customHistory}>
<div>
<Navbar />
<Routes>
<Route path="/" exact element={<Home />} />
<Route path="/:title" element={<ProductList />} />
<Route path="/:title/:product" element={<ProductPage />} />
</Routes>
</div>
</Router>
);
}
HTML Code where the background image is:
</head>
<style>
html {
scroll-behavior: smooth;
overflow: scroll;
overflow-x: hidden;
background: url(images/gradient.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
</style>
<body class="text-white" style="font-family: 'Inter', sans-serif; font-weight: 500">
<div id="root"></div>
</body>
</html>