Skip to content

Commit

Permalink
Merge pull request #6 from dalurness/du/dynamicSolution
Browse files Browse the repository at this point in the history
move client load up a level
  • Loading branch information
dalurness authored Nov 8, 2024
2 parents 114a1e2 + 511a783 commit eab41b6
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 eab41b6

Please sign in to comment.