mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
fix(site): revert FrameworkCase conditional rendering (#1317)
This commit is contained in:
@@ -11,7 +11,27 @@ const { framework } = Astro.params;
|
||||
|
||||
// Only render if current framework matches, or if no frameworks specified (all frameworks)
|
||||
const shouldRender = !frameworks || frameworks.includes(framework as SupportedFramework);
|
||||
const html = shouldRender ? await Astro.slots.render('default') : '';
|
||||
---
|
||||
|
||||
{shouldRender && <Fragment set:html={html} />}
|
||||
{
|
||||
/*
|
||||
What I WANT to do is
|
||||
```
|
||||
{shouldRender && <slot />}
|
||||
```
|
||||
|
||||
But I'm running into some crazy problems with hydration.
|
||||
Putting client:* 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}
|
||||
data-search-ignore={shouldRender ? undefined : "all"}
|
||||
data-llms-ignore={shouldRender ? undefined : "all"}
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user