revert(site): remove unnecessary hydration workarounds

This reverts commit 476fabf7aa.
This commit is contained in:
Darius Cepulis
2025-10-30 01:10:38 -05:00
parent 7418465768
commit 088caf5212
9 changed files with 49 additions and 45 deletions
+16 -14
View File
@@ -3,15 +3,9 @@ import type { SupportedFramework } from '@/types/docs';
interface Props {
frameworks?: SupportedFramework[];
/**
* I'm running into some crazy problems with hydration.
* Putting client:load in one of these conditionals causes Astro to just give up hydrating the whole app for some reason.
* If you're running into that, too, this prop may be for you.
*/
withHydrationWorkaround?: boolean;
}
const { frameworks, withHydrationWorkaround } = Astro.props;
const { frameworks } = Astro.props;
const { framework } = Astro.params;
// Only render if current framework matches, or if no frameworks specified (all frameworks)
@@ -19,11 +13,19 @@ const shouldRender = !frameworks || frameworks.includes(framework as SupportedFr
---
{
withHydrationWorkaround ? (
<div class="contents" hidden={!shouldRender}>
<slot />
</div>
) : (
shouldRender && <slot />
)
/*
What I WANT to do is
```
{shouldRender && <slot />}
```
But I'm running into some crazy problems with hydration.
Putting client:load in one of these conditionals causes Astro to just give up hydrating the whole app for some reason.
TODO: fix this
So, while I debug those... let's do this
*/
}
<div class="contents" hidden={!shouldRender}>
<slot />
</div>