Update LanguageSelector and development page components for improved client behavior

- Changed LanguageSelectorComponent to use client:visible for better loading performance.
- Updated CollapsibleIntro and ContributionCalendar components to utilize client:visible, enhancing user experience by ensuring they load only when in view.
This commit is contained in:
2025-06-07 16:58:32 +02:00
parent 73ec3b5120
commit a4c02a712c
3 changed files with 4 additions and 4 deletions

View File

@@ -8,4 +8,4 @@ interface Props {
const { defaultLang } = Astro.props;
---
<LanguageSelectorComponent client:load defaultLang={defaultLang} />
<LanguageSelectorComponent client:visible defaultLang={defaultLang} />

View File

@@ -74,7 +74,7 @@ const { language, textDirection } = I18N;
<CookieBanner />
<BackToTop />
<!-- Start of Rocket.Chat Livechat Script -->
<script type="text/javascript">
<script type="text/javascript" defer>
(function(w, d, s, u) {
w.RocketChat = function(c) { w.RocketChat._.push(c) }; w.RocketChat._ = []; w.RocketChat.url = u;
const h = d.getElementsByTagName(s)[0], j = d.createElement(s);

View File

@@ -114,10 +114,10 @@ const formatDate = (dateString) => {
<div class="max-w-4xl mx-auto px-4 py-8">
<h1 class="text-xl sm:text-2xl md:text-4xl font-bold mb-4">{t.development.pageTitle || 'Development Progress'}</h1>
{/* Collapsible Intro */}
<CollapsibleIntro text={t.development.intro} client:only="react" />
<CollapsibleIntro text={t.development.intro} client:visible />
{/* Contribution Calendar */}
<div class="mb-8">
<ContributionCalendar data={contributionData} client:only="react" />
<ContributionCalendar data={contributionData} client:visible />
</div>
<div class="space-y-8">
<section>