Skip to content

Commit 9265e92

Browse files
committed
fix: deploy
1 parent b778bf0 commit 9265e92

File tree

6 files changed

+102
-132
lines changed

6 files changed

+102
-132
lines changed

app/api/notes.txt

Lines changed: 0 additions & 3 deletions
This file was deleted.

app/page.tsx

Lines changed: 4 additions & 129 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import React from "react";
2-
// Assuming this is a Next.js environment for the prompt's context
3-
import Link from "next/link";
42
import {
53
Code,
64
Users,
@@ -10,139 +8,18 @@ import {
108
GraduationCap,
119
MessageSquare,
1210
} from "lucide-react";
11+
import { CallToActionButton } from "@/components/cta";
12+
import { Feature } from "@/components/Features";
1313

14-
// --- Type Definitions for Props ---
15-
16-
// Type definition for Lucide icons, which are React components
17-
type IconType = React.ElementType;
18-
19-
interface FeatureProps {
20-
title: string;
21-
desc: string;
22-
Icon: IconType;
23-
}
24-
25-
interface CallToActionButtonProps {
26-
href: string;
27-
children: React.ReactNode;
28-
variant?: "default" | "secondary";
29-
className?: string;
30-
}
31-
32-
// --- Utility Components (Simulating shadcn/ui styles and functionality) ---
33-
34-
// Feature Card with Icon
35-
const Feature: React.FC<FeatureProps> = ({ title, desc, Icon }) => {
36-
return (
37-
<div className="flex flex-col space-y-4 rounded-xl border bg-card p-6 text-card-foreground shadow-lg transition-all duration-300 hover:shadow-xl hover:border-primary/50 md:p-8">
38-
<div className="p-3 w-fit rounded-full bg-primary/10 text-primary">
39-
{/* Icon prop is rendered here */}
40-
<Icon className="w-7 h-7" />
41-
</div>
42-
<h3 className="text-xl font-semibold tracking-tight">{title}</h3>
43-
<p className="text-muted-foreground text-base leading-relaxed">{desc}</p>
44-
</div>
45-
);
46-
};
47-
48-
// Button-like component to simulate shadcn Button and Next.js Link styling
49-
50-
const CallToActionButton: React.FC<CallToActionButtonProps> = ({
51-
href,
52-
children,
53-
variant = "default",
54-
className = "",
55-
}) => {
56-
const baseClasses =
57-
"inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 h-11 px-6 py-2 tracking-wide";
58-
59-
const defaultClasses =
60-
"bg-primary text-primary-foreground shadow-xl hover:bg-primary/90";
61-
const secondaryClasses =
62-
"bg-secondary text-secondary-foreground shadow-md hover:bg-secondary/80 border border-input";
63-
64-
const variantClasses =
65-
variant === "default" ? defaultClasses : secondaryClasses;
66-
67-
return (
68-
<Link
69-
href={href}
70-
className={`${baseClasses} ${variantClasses} ${className}`}
71-
>
72-
{children}
73-
</Link>
74-
);
75-
};
76-
77-
// Main navigation/header component
78-
const Header: React.FC = () => {
79-
return (
80-
<header className="py-4 border-b border-border/40 sticky top-0 z-10 bg-background/90 backdrop-blur-sm">
81-
<div className="mx-auto max-w-5xl px-4 flex justify-between items-center">
82-
<h1 className="text-2xl font-bold tracking-tighter text-foreground">
83-
Dev<span className="text-primary">Ripple</span>
84-
</h1>
85-
<nav className="hidden sm:flex space-x-6 text-sm">
86-
{/* Use standard <a> for section links to avoid full page load */}
87-
<a
88-
href="#features"
89-
className="text-muted-foreground hover:text-primary transition-colors"
90-
>
91-
Features
92-
</a>
93-
<a
94-
href="#workflow"
95-
className="text-muted-foreground hover:text-primary transition-colors"
96-
>
97-
How It Works
98-
</a>
99-
<a
100-
href="#cta"
101-
className="text-muted-foreground hover:text-primary transition-colors"
102-
>
103-
Join
104-
</a>
105-
</nav>
106-
<CallToActionButton
107-
href="/dashboard"
108-
variant="secondary"
109-
className="h-9 px-4 py-2"
110-
>
111-
Go to Dashboard
112-
</CallToActionButton>
113-
</div>
114-
</header>
115-
);
116-
};
117-
118-
// CSS string for colors and font import
11914
const customCss = `
12015
/* Load Inter font (using a web-safe sans-serif fallback) */
12116
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap');
122-
123-
12417
`;
12518

126-
// The main landing page component
127-
const HomePage: React.FC = () => {
19+
export default function HomePage() {
12820
return (
12921
<div className="min-h-screen bg-background text-foreground font-sans">
130-
{/* FIX: Hydration Error
131-
The <style> block is fixed by using dangerouslySetInnerHTML, which
132-
tells React not to manage its content during hydration, preventing
133-
the server/client content mismatch (due to different string
134-
serialization/escaping).
135-
*/}
13622
<style dangerouslySetInnerHTML={{ __html: customCss }} />
137-
138-
{/* NOTE: In a real project, Tailwind CSS is imported via a global CSS file,
139-
not a <script> tag. The script tag is left as it was in the original
140-
code for simulation purposes, though it has no effect in a standard
141-
Next.js/TSX environment. */}
142-
{/* <script src="https://cdn.tailwindcss.com"></script> */}
143-
144-
{/* <Header /> */}
145-
14623
<main className="mx-auto max-w-5xl px-4 py-12 md:py-24">
14724
{/* === 1. Hero Section === */}
14825
<section className="text-center mb-20 md:mb-32">
@@ -281,6 +158,4 @@ const HomePage: React.FC = () => {
281158
</footer>
282159
</div>
283160
);
284-
};
285-
286-
export default HomePage;
161+
}

components/Features.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { FeatureProps } from "@/types";
2+
3+
export const Feature: React.FC<FeatureProps> = ({ title, desc, Icon }) => {
4+
return (
5+
<div className="flex flex-col space-y-4 rounded-xl border bg-card p-6 text-card-foreground shadow-lg transition-all duration-300 hover:shadow-xl hover:border-primary/50 md:p-8">
6+
<div className="p-3 w-fit rounded-full bg-primary/10 text-primary">
7+
{/* Icon prop is rendered here */}
8+
<Icon className="w-7 h-7" />
9+
</div>
10+
<h3 className="text-xl font-semibold tracking-tight">{title}</h3>
11+
<p className="text-muted-foreground text-base leading-relaxed">{desc}</p>
12+
</div>
13+
);
14+
};

components/cta.tsx

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
import { CallToActionButtonProps } from "@/types";
2+
import Link from "next/link";
3+
4+
export const CallToActionButton: React.FC<CallToActionButtonProps> = ({
5+
href,
6+
children,
7+
variant = "default",
8+
className = "",
9+
}) => {
10+
const baseClasses =
11+
"inline-flex items-center justify-center whitespace-nowrap rounded-lg text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 h-11 px-6 py-2 tracking-wide";
12+
13+
const defaultClasses =
14+
"bg-primary text-primary-foreground shadow-xl hover:bg-primary/90";
15+
const secondaryClasses =
16+
"bg-secondary text-secondary-foreground shadow-md hover:bg-secondary/80 border border-input";
17+
18+
const variantClasses =
19+
variant === "default" ? defaultClasses : secondaryClasses;
20+
21+
return (
22+
<Link
23+
href={href}
24+
className={`${baseClasses} ${variantClasses} ${className}`}
25+
>
26+
{children}
27+
</Link>
28+
);
29+
};

components/header.tsx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { CallToActionButton } from "./cta";
2+
3+
export const Header: React.FC = () => {
4+
return (
5+
<header className="py-4 border-b border-border/40 sticky top-0 z-10 bg-background/90 backdrop-blur-sm">
6+
<div className="mx-auto max-w-5xl px-4 flex justify-between items-center">
7+
<h1 className="text-2xl font-bold tracking-tighter text-foreground">
8+
Dev<span className="text-primary">Ripple</span>
9+
</h1>
10+
<nav className="hidden sm:flex space-x-6 text-sm">
11+
{/* Use standard <a> for section links to avoid full page load */}
12+
<a
13+
href="#features"
14+
className="text-muted-foreground hover:text-primary transition-colors"
15+
>
16+
Features
17+
</a>
18+
<a
19+
href="#workflow"
20+
className="text-muted-foreground hover:text-primary transition-colors"
21+
>
22+
How It Works
23+
</a>
24+
<a
25+
href="#cta"
26+
className="text-muted-foreground hover:text-primary transition-colors"
27+
>
28+
Join
29+
</a>
30+
</nav>
31+
<CallToActionButton
32+
href="/dashboard"
33+
variant="secondary"
34+
className="h-9 px-4 py-2"
35+
>
36+
Go to Dashboard
37+
</CallToActionButton>
38+
</div>
39+
</header>
40+
);
41+
};

types/index.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
export type IconType = React.ElementType;
2+
3+
export interface FeatureProps {
4+
title: string;
5+
desc: string;
6+
Icon: IconType;
7+
}
8+
9+
export interface CallToActionButtonProps {
10+
href: string;
11+
children: React.ReactNode;
12+
variant?: "default" | "secondary";
13+
className?: string;
14+
}

0 commit comments

Comments
 (0)