← Files WixARCHIVED FILE

skills/wix-headless-templates/portfolio/project/src/pages/portfolio.astro

835 Bytes · Oct 8, 2026 · 12:02 UTC

↓ Download file

See the change to this file →

---
// Collections gallery — data fetched SERVER-SIDE (SEO) and handed to the island as DTO props.
// Keep this frontmatter; swap the island import to YOUR gallery component.
import SiteLayout from "../layouts/SiteLayout.astro";
import CollectionsView from "../components/portfolio/CollectionsView";
import { fetchCollections } from "../wix/portfolio/portfolio";
import type { CollectionSummary } from "../wix/portfolio/types";

let collections: CollectionSummary[] = [];
try {
  collections = await fetchCollections();
} catch {
  // An unguarded SSR throw truncates the response mid-stream; the island renders the
  // empty state instead.
}
---

<SiteLayout title="Portfolio">
  <h1 class="mb-8 text-2xl font-semibold tracking-tight">Portfolio</h1>
  <CollectionsView client:load initialCollections={collections} />
</SiteLayout>

SHA-256: b89058fb0b58559ece11ebd9b0a1dceba7f359eb5818a35cb85582aac1bab029