- Updated Astro core package and related integrations to latest versions - Added environment variable configuration in astro.config.mjs - Removed deprecated migration plan and favicon.svg files - Updated Search component to use onCleanup for proper effect cleanup - Updated Appwrite service integration and configuration - Removed old migration documentation and scripts
31 lines
1.0 KiB
Plaintext
31 lines
1.0 KiB
Plaintext
---
|
|
import PageLayout from "@layouts/PageLayout.astro"
|
|
import TopLayout from "@layouts/TopLayout.astro"
|
|
import BottomLayout from "@layouts/BottomLayout.astro"
|
|
import Search from "@components/Search"
|
|
import { SEARCH } from "@consts"
|
|
|
|
// The search page now uses client-side search with Appwrite SDK directly
|
|
// No need to pre-load all data as the Search component handles this via API calls
|
|
|
|
// Handle URL search parameters - add proper client-side handling for search query
|
|
const url = new URL(typeof window !== 'undefined' ? window.location.href : 'http://localhost')
|
|
const searchParam = url.searchParams.get('search') || ''
|
|
|
|
// Pass initial search query to component if present in URL
|
|
const initialQuery = searchParam
|
|
---
|
|
|
|
<PageLayout title={SEARCH.TITLE} description={SEARCH.DESCRIPTION}>
|
|
<TopLayout>
|
|
<div class="animate page-heading">
|
|
{SEARCH.TITLE}
|
|
</div>
|
|
</TopLayout>
|
|
<BottomLayout>
|
|
<div class="animate" id="search-container">
|
|
<Search client:load query={initialQuery}/>
|
|
</div>
|
|
</BottomLayout>
|
|
</PageLayout>
|