Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 2 additions & 16 deletions app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,5 @@
import Link from 'next/link';
import Spline from '@splinetool/react-spline/next';
import { Button } from '@/components/ui/button';
import { redirect } from 'next/navigation';

export default function Home() {
return (
<main className="relative h-screen w-screen">
<Spline scene="https://prod.spline.design/DS0UgrDOifhNt9T6/scene.splinecode" />
<div className="absolute bottom-8 left-1/2 -translate-x-1/2">
<Button
asChild
className="bg-[hsl(246,82%,60%)] text-white hover:opacity-90"
>
<Link href="/login">cerch now</Link>
</Button>
</div>
</main>
);
redirect('/landingpage.html');
Comment on lines +1 to +4

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Redirect makes root page server-only and breaks client imports

Replacing the home component with redirect('/landingpage.html') turns app/page.tsx into a server‑only module. Any existing client components or tests that import this page now fail to compile with This module cannot be imported from a Client Component module (as seen in pnpm test). Consider performing the redirect in middleware.ts, a Next.js rewrite, or a client‑side hook so the page remains importable where the client build expects it.

Useful? React with 👍 / 👎.

}
43 changes: 43 additions & 0 deletions docs/prd/landing-page-replacement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Landing Page Replacement PRD

## Context
The existing landing page is a minimal Spline demo. A richer landing page exists in `landingpage.html` with animations and marketing copy. We want this new page to serve as the site's entry point.

## Goals
- Serve `landingpage.html` when users visit `/`.
- Ensure primary call‑to‑action buttons navigate to the chat window.

## Non-goals
- Redesign of chat or authentication flows.
- Copy or design changes beyond integrating the provided HTML.

## Scope & Assumptions
- Replace `/` route with static HTML file in `public`.
- Update CTA buttons (`Generate my first list`) to link to `/chat`.
- Assume existing chat route at `/chat` remains unchanged.

## Approach
- Move `landing.html` to `public/landingpage.html`.
- Replace `app/page.tsx` with a redirect to `/landingpage.html`.
- Convert CTA buttons to anchor tags targeting `/chat`.

## Impacted Areas
- `app/page.tsx`.
- `public/landingpage.html`.

## Risks & Mitigations
- **Risk:** Static HTML may bypass Next.js layout styling.
- *Mitigation:* Keep page self‑contained with its own styles.
- **Risk:** Redirect loop if file missing.
- *Mitigation:* Ensure `landingpage.html` committed under `public/`.

## Validation
- Run linting and Playwright tests (`pnpm lint`, `pnpm test`).
- Manually verify landing page loads and CTA links to `/chat`.

## Rollout/Rollback
- Rollout: deploy updated build.
- Rollback: revert commit to restore previous landing page.

## Links
- PR: (TBD)
Loading