Skip to content

Commit

Permalink
move client load up a level
Browse files Browse the repository at this point in the history
  • Loading branch information
dalurness committed Nov 8, 2024
1 parent 9d25210 commit 511a783
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/components/DynamicSolution.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ export function DynamicSolution({ resultComponent }: { resultComponent: string }
if (!Component) return null

return (
<Component client:load />
<Component />
)
};
6 changes: 5 additions & 1 deletion src/layouts/Day.astro
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ const { day, title, resultComponent } = Astro.props;
</div>

<div class="flex flex-col max-w-screen-lg w-full mx-auto px-4 md:px-6 my-12">
{resultComponent && <DynamicSolution resultComponent={resultComponent} />}
{
resultComponent && (
<DynamicSolution resultComponent={resultComponent} client:load />
)
}
</div>
</Layout>

0 comments on commit 511a783

Please sign in to comment.