I have a page in my astro project. When I open this page from another one (which contains Sidebar but not PatientSidebar), Sidebar shows as expected, but PatientSidebar does not display unless refreshed.
---
import "@/astro/src/styles/main.css";
import { ViewTransitions } from "astro:transitions";
import Sidebar from "@components/react/Sidebar";
import PatientSidebar from "@components/react/PatientSidebar";
---
<html>
<head>
<title>Test</title>
<ViewTransitions />
</head>
<body class="flex flex-row items-center justify-center align-middle h-screen">
<Sidebar client:only transition:persist />
<PatientSidebar client:only transition:persist />
<main class="w-full h-full flex flex-col">
<slot />
</main>
</body>
</html>
I have also noticed that when I remove the <ViewTransitions /> tag, PatientSidebar appears as expected. Is there a reason for this behaviour?