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:
@@ -8,4 +8,4 @@ interface Props {
|
||||
const { defaultLang } = Astro.props;
|
||||
---
|
||||
|
||||
<LanguageSelectorComponent client:load defaultLang={defaultLang} />
|
||||
<LanguageSelectorComponent client:visible defaultLang={defaultLang} />
|
||||
|
@@ -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);
|
||||
|
@@ -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>
|
||||
|
Reference in New Issue
Block a user