Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

feat: MVP for open-source (#11)

Dillion Verma9a257506af13
diff --git a/.env.example b/.env.example
index 3f7224e7..95eeddbd 100644
--- a/.env.example
+++ b/.env.example
@@ -1,23 +1,2 @@
-NEXTAUTH_SECRET=secret
-
-NEXT_PUBLIC_APP_URL=http://localhost:3000
-NEXTAUTH_URL=http://localhost:3000
-
PORT=3000
-POSTGRES_USER=postgres
-POSTGRES_PASSWORD=postgres
-POSTGRES_HOSTNAME=localhost
-POSTGRES_PORT=5432
-POSTGRES_DB=magicui
-DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOSTNAME}:${POSTGRES_PORT}/${POSTGRES_DB}
-
-GITHUB_CLIENT_ID=client_id
-GITHUB_CLIENT_SECRET=client_secret
-GITHUB_ACCESS_TOKEN=access_token
-
-RESEND_API_KEY=re_123
-STRIPE_API_KEY=
-STRIPE_WEBHOOK_SECRET=
-NEXT_PUBLIC_POSTHOG_API_KEY=
-
-NEXT_PUBLIC_STRIPE_PAYMENT_LINK="https://buy.stripe.com/dR67vD4Vu4jAekwfZ2?prefilled_promo_code=ONEDAYSPECIAL"
+NEXT_PUBLIC_APP_URL=http://localhost:3000
\ No newline at end of file
diff --git a/app/(auth)/layout.tsx b/app/(auth)/layout.tsx
deleted file mode 100644
index a8e60325..00000000
--- a/app/(auth)/layout.tsx
+++ /dev/null
@@ -1,7 +0,0 @@
-interface AuthLayoutProps {
- children: React.ReactNode;
-}
-
-export default function AuthLayout({ children }: AuthLayoutProps) {
- return <div className="min-h-screen">{children}</div>;
-}
diff --git a/app/(auth)/login/page.tsx b/app/(auth)/login/page.tsx
deleted file mode 100644
index ba19e934..00000000
--- a/app/(auth)/login/page.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import { Icons } from "@/components/icons";
-import { buttonVariants } from "@/components/ui/button";
-import { UserAuthForm } from "@/components/user-auth-form";
-import { cn } from "@/lib/utils";
-import { Metadata } from "next";
-import Link from "next/link";
-
-export const metadata: Metadata = {
- title: "Login | Magic UI",
- description: "Login to your account",
-};
-
-export default function LoginPage() {
- return (
- <div className="container flex h-screen w-screen flex-col items-center justify-center">
- <Link
- href="/"
- className={cn(
- buttonVariants({ variant: "ghost" }),
- "absolute left-4 top-4 md:left-8 md:top-8",
- )}
- >
- <>
- <Icons.chevronLeft className="mr-2 h-4 w-4" />
- Back
- </>
- </Link>
- <div className="mx-auto flex w-full flex-col justify-center gap-6 sm:w-[350px]">
- <div className="flex flex-col gap-2 text-center">
- <Icons.logo className="mx-auto h-6 w-6" />
- <h1 className="text-2xl font-semibold tracking-tight">
- Welcome back
- </h1>
- <p className="text-sm text-muted-foreground">Login to your account</p>
- </div>
- <UserAuthForm />
- <p className="px-8 text-center text-sm text-muted-foreground">
- <Link
- href="/register"
- className="hover:text-brand underline underline-offset-4"
- >
- Don&apos;t have an account? Sign Up
- </Link>
- </p>
- </div>
- </div>
- );
-}
diff --git a/app/(auth)/register/page.tsx b/app/(auth)/register/page.tsx
deleted file mode 100644
index 500f6458..00000000
--- a/app/(auth)/register/page.tsx
+++ /dev/null
@@ -1,59 +0,0 @@
-import Link from "next/link";
-
-import { Icons } from "@/components/icons";
-import { buttonVariants } from "@/components/ui/button";
-import { UserAuthForm } from "@/components/user-auth-form";
-import { cn } from "@/lib/utils";
-
-export const metadata = {
- title: "Create an account | Magic UI",
- description: "Create an account to get started.",
-};
-
-export default function RegisterPage() {
- return (
- <div className="container grid h-screen w-screen flex-col items-center justify-center lg:max-w-none lg:grid-cols-2 lg:px-0">
- <Link
- href="/login"
- className={cn(
- buttonVariants({ variant: "ghost" }),
- "absolute right-4 top-4 md:right-8 md:top-8",
- )}
- >
- Login
- </Link>
- <div className="hidden h-full bg-muted lg:block" />
- <div className="lg:p-8">
- <div className="mx-auto flex w-full flex-col justify-center space-y-6 sm:w-[350px]">
- <div className="flex flex-col space-y-2 text-center">
- <Icons.logo className="mx-auto h-6 w-6" />
- <h1 className="text-2xl font-semibold tracking-tight">
- Create an account
- </h1>
- <p className="text-sm text-muted-foreground">
- Enter your email below to create your account
- </p>
- </div>
- <UserAuthForm />
- <p className="px-8 text-center text-sm text-muted-foreground">
- By clicking continue, you agree to our{" "}
- <Link
- href="/terms"
- className="hover:text-brand underline underline-offset-4"
- >
- Terms of Service
- </Link>{" "}
- and{" "}
- <Link
- href="/privacy"
- className="hover:text-brand underline underline-offset-4"
- >
- Privacy Policy
- </Link>
- .
- </p>
- </div>
- </div>
- </div>
- );
-}
diff --git a/app/(dashboard)/dashboard/billing/create-billing-portal.action.ts b/app/(dashboard)/dashboard/billing/create-billing-portal.action.ts
deleted file mode 100644
index 8c1d9727..00000000
--- a/app/(dashboard)/dashboard/billing/create-billing-portal.action.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-"use server";
-
-import { getCurrentUser } from "@/lib/session";
-import { stripe } from "@/lib/stripe";
-import { getStripeCustomerByEmail } from "@/lib/stripe/get-customer";
-import { getPortalSession } from "@/lib/stripe/get-portal-session";
-// import { getSubscriptionByUserId } from "@/lib/stripe/get-subscription-by-user-id";
-import { redirect } from "next/navigation";
-import type Stripe from "stripe";
-
-export const createBillingPortal = async () => {
- const user = await getCurrentUser();
-
- if (!user) {
- redirect("/");
- }
-
- let stripeCustomer: Stripe.Customer | null = null;
-
- // Fallback to check if a Stripe customer already exists for the current user email.
- if (!stripeCustomer) {
- stripeCustomer = await getStripeCustomerByEmail(user.email!);
- }
-
- // Create a Stripe customer if it does not exist for the current user.
- if (!stripeCustomer) {
- stripeCustomer = await stripe.customers.create({
- name: user.name ?? undefined,
- email: user.email!,
- metadata: {
- userId: user.id,
- },
- });
- }
-
- return getPortalSession({
- customerId: stripeCustomer.id,
- returnUrl: `${process.env.NEXT_PUBLIC_APP_URL}/settings/billing`,
- });
-};
diff --git a/app/(dashboard)/dashboard/billing/page.tsx b/app/(dashboard)/dashboard/billing/page.tsx
deleted file mode 100644
index 657e9682..00000000
--- a/app/(dashboard)/dashboard/billing/page.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { DashboardHeader } from "@/components/dashboard/header";
-import { DashboardShell } from "@/components/dashboard/shell";
-import { BillingPortalButton } from "@/components/stripe-portal-button";
-import { buttonVariants } from "@/components/ui/button";
-import { authOptions } from "@/lib/auth";
-import { getCurrentUser } from "@/lib/session";
-import { cn } from "@/lib/utils";
-import Link from "next/link";
-import { redirect } from "next/navigation";
-
-export const metadata = {
- title: "Billing | Magic UI",
- description: "Manage billing information.",
-};
-
-export default async function BillingPage() {
- const user = await getCurrentUser();
-
- if (!user) {
- redirect(authOptions?.pages?.signIn || "/login");
- }
-
- return (
- <DashboardShell>
- <DashboardHeader heading="Billing" text="Manage billing information" />
- <BillingPortalButton>Manage Billing</BillingPortalButton>
- <Link
- href={`https://zenvoice.io/p/65d4ce3bbba9ed59ff11c076?email=${user.email}`}
- target="_blank"
- rel="noopener noreferrer"
- className={cn(buttonVariants(), "flex w-full max-w-[400px] gap-2")}
- >
- Generate Invoice
- </Link>
- {/* <div className="grid gap-8">
- <OrderList payments={payments} />
- </div> */}
- </DashboardShell>
- );
-}
diff --git a/app/(dashboard)/dashboard/layout.tsx b/app/(dashboard)/dashboard/layout.tsx
deleted file mode 100644
index 9c6865b8..00000000
--- a/app/(dashboard)/dashboard/layout.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import { DashboardNav } from "@/components/dashboard/nav";
-import { SiteFooter } from "@/components/site-footer";
-import { SiteHeader } from "@/components/site-header";
-import { dashboardConfig } from "@/config/dashboard";
-import { getCurrentUser } from "@/lib/session";
-
-interface MarketingLayoutProps {
- children: React.ReactNode;
-}
-
-export default async function MarketingLayout({
- children,
-}: MarketingLayoutProps) {
- const user = await getCurrentUser();
-
- return (
- <div className="flex min-h-screen flex-col space-y-6">
- <SiteHeader user={user} />
- <div className="container grid flex-1 gap-12 md:grid-cols-[200px_1fr]">
- <aside className="hidden w-[200px] flex-col md:flex">
- <DashboardNav items={dashboardConfig.sidebarNav} />
- </aside>
- <main className="flex w-full flex-1 flex-col overflow-hidden">
- {children}
- </main>
- </div>
- <SiteFooter />
- </div>
- );
-}
diff --git a/app/(dashboard)/dashboard/loading.tsx b/app/(dashboard)/dashboard/loading.tsx
deleted file mode 100644
index 79160ab5..00000000
--- a/app/(dashboard)/dashboard/loading.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import { DashboardHeader } from "@/components/dashboard/header";
-import { DashboardShell } from "@/components/dashboard/shell";
-import { Skeleton } from "@/components/ui/skeleton";
-
-function SkeletonRow() {
- return (
- <div className="p-4">
- <div className="space-y-3">
- <Skeleton className="h-5 w-2/5" />
- <Skeleton className="h-4 w-4/5" />
- </div>
- </div>
- );
-}
-
-export default function DashboardLoading() {
- return (
- <DashboardShell>
- <DashboardHeader
- heading="Dashboard"
- text="Manage account"
- ></DashboardHeader>
- <div className="divide-border-200 divide-y rounded-md border">
- <SkeletonRow />
- <SkeletonRow />
- <SkeletonRow />
- <SkeletonRow />
- <SkeletonRow />
- </div>
- </DashboardShell>
- );
-}
diff --git a/app/(dashboard)/dashboard/settings/page.tsx b/app/(dashboard)/dashboard/settings/page.tsx
deleted file mode 100644
index 298d76fc..00000000
--- a/app/(dashboard)/dashboard/settings/page.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import { DashboardHeader } from "@/components/dashboard/header";
-import { DashboardShell } from "@/components/dashboard/shell";
-import { UserProfileForm } from "@/components/dashboard/user-profile-form";
-import { authOptions } from "@/lib/auth";
-import { getCurrentUser } from "@/lib/session";
-import { redirect } from "next/navigation";
-
-export const metadata = {
- title: "Settings | Magic UI",
- description: "Manage account settings.",
-};
-
-export default async function SettingsPage() {
- const user = await getCurrentUser();
-
- if (!user) {
- redirect(authOptions?.pages?.signIn || "/login");
- }
-
- return (
- <DashboardShell>
- <DashboardHeader heading="Settings" text="Manage account settings." />
- <div className="grid gap-10">
- <UserProfileForm />
- </div>
- </DashboardShell>
- );
-}
diff --git a/app/(docs)/layout.tsx b/app/(docs)/layout.tsx
index dbfc5c08..cc78f619 100644
--- a/app/(docs)/layout.tsx
+++ b/app/(docs)/layout.tsx
@@ -1,6 +1,6 @@
+import { SiteBanner } from "@/components/site-banner";
import { SiteFooter } from "@/components/site-footer";
import { SiteHeader } from "@/components/site-header";
-import { getCurrentUser } from "@/lib/session";
interface MarketingLayoutProps {
children: React.ReactNode;
@@ -9,12 +9,10 @@ interface MarketingLayoutProps {
export default async function MarketingLayout({
children,
}: MarketingLayoutProps) {
- const user = await getCurrentUser();
-
return (
<>
- {/* <DealBanner /> */}
- <SiteHeader user={user} />
+ <SiteBanner />
+ <SiteHeader />
<main className="flex-1">{children}</main>
<SiteFooter />
</>
diff --git a/app/(marketing)/faqs/page.tsx b/app/(marketing)/faqs/page.tsx
deleted file mode 100644
index 70409d9d..00000000
--- a/app/(marketing)/faqs/page.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-import Faq from "@/components/pricing/faq";
-import { absoluteUrl, constructMetadata } from "@/lib/utils";
-
-export const metadata = constructMetadata({
- title: "Frequently Asked Questions",
- description: "Frequently Asked Questions about Magic UI",
- image: absoluteUrl(`/api/og`),
-});
-
-export default function FAQS() {
- return <Faq />;
-}
diff --git a/app/(marketing)/layout.tsx b/app/(marketing)/layout.tsx
index 60e61645..cc78f619 100644
--- a/app/(marketing)/layout.tsx
+++ b/app/(marketing)/layout.tsx
@@ -1,6 +1,6 @@
+import { SiteBanner } from "@/components/site-banner";
import { SiteFooter } from "@/components/site-footer";
import { SiteHeader } from "@/components/site-header";
-import { getCurrentUser } from "@/lib/session";
interface MarketingLayoutProps {
children: React.ReactNode;
@@ -9,18 +9,12 @@ interface MarketingLayoutProps {
export default async function MarketingLayout({
children,
}: MarketingLayoutProps) {
- const user = await getCurrentUser();
-
return (
<>
- {/* <DealBanner /> */}
- {/* <SiteBanner /> */}
- <SiteHeader user={user} />
+ <SiteBanner />
+ <SiteHeader />
<main className="flex-1">{children}</main>
<SiteFooter />
-
- {/* Top Ellipse Gradient */}
- <div className="pointer-events-none absolute inset-0 h-screen bg-[radial-gradient(ellipse_80%_50%_at_50%_-20%,rgba(255,189,122,0.2),rgba(255,255,255,0))] dark:bg-[radial-gradient(ellipse_80%_50%_at_50%_-20%,rgba(120,119,198,0.5),rgba(255,255,255,0))]" />
</>
);
}
diff --git a/app/(marketing)/page.tsx b/app/(marketing)/page.tsx
index 4fb647a7..3128eec7 100644
--- a/app/(marketing)/page.tsx
+++ b/app/(marketing)/page.tsx
@@ -1,18 +1,12 @@
import CTASection from "@/components/landing/cta-section";
import Hero from "@/components/landing/hero";
-import Testimonials from "@/components/pricing/testimonials";
+import Testimonials from "@/components/landing/testimonials";
export default async function Home() {
return (
<>
<Hero />
- {/* <WhatIsMagicUI /> */}
<Testimonials />
- {/* <FeatureGrid /> */}
- {/* <FeatureSections /> */}
- {/* <ChangelogSection /> */}
- {/* <Pricing /> */}
- {/* <Faq /> */}
<CTASection />
</>
);
diff --git a/app/(marketing)/pricing/page.tsx b/app/(marketing)/pricing/page.tsx
deleted file mode 100644
index d791ce61..00000000
--- a/app/(marketing)/pricing/page.tsx
+++ /dev/null
@@ -1,28 +0,0 @@
-import Faq from "@/components/pricing/faq";
-import Pricing from "@/components/pricing/pricing";
-import Testimonials from "@/components/pricing/testimonials";
-import { absoluteUrl, constructMetadata } from "@/lib/utils";
-
-export const metadata = constructMetadata({
- title: "Lifetime Access to Beautifully Crafted Tailwind CSS Components",
- description:
- "Get lifetime access to beautifully crafted React + Tailwind CSS + Framer Motion components and templates for your next web project. Get lifetime access to all components and templates",
- image: absoluteUrl(`/api/og`),
-});
-
-export default function PricingPage() {
- return (
- <div className="relative">
- <div
- className={`absolute inset-0 -z-10 m-auto h-full max-h-[800px] w-full max-w-[800px] rounded-full opacity-20 blur-[150px]`}
- style={{
- background:
- "linear-gradient(180deg, #9E7AFF 0%,#FE8BBB 33.33%,#FFBD7A 66.67%,#F8EAC3 100%)",
- }}
- ></div>
- <Pricing />
- <Testimonials />
- <Faq />
- </div>
- );
-}
diff --git a/app/api/auth/[...nextauth]/_route.ts b/app/api/auth/[...nextauth]/_route.ts
deleted file mode 100644
index eea72375..00000000
--- a/app/api/auth/[...nextauth]/_route.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import NextAuth from "next-auth";
-
-import { authOptions } from "@/lib/auth";
-
-const handler = NextAuth(authOptions);
-
-export { handler as GET, handler as POST };
diff --git a/app/api/me/route.ts b/app/api/me/route.ts
deleted file mode 100644
index dea57c04..00000000
--- a/app/api/me/route.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import { authOptions } from "@/lib/auth";
-import { db } from "@/lib/db";
-import { getServerSession } from "next-auth";
-import { z } from "zod";
-
-export async function GET() {
- try {
- const session = await getServerSession(authOptions);
-
- if (!session?.user) {
- return new Response(null, { status: 403 });
- }
-
- const user = await db.user.findUnique({
- where: {
- id: session.user.id,
- },
- include: {
- customer: {
- include: {
- payments: true,
- },
- },
- accounts: true,
- },
- });
-
- if (!user) {
- return new Response(JSON.stringify({ error: "User not found." }), {
- status: 404,
- });
- }
-
- return new Response(JSON.stringify({ user }), {
- status: 200,
- });
- } catch (error) {
- if (error instanceof z.ZodError) {
- return new Response(JSON.stringify(error.issues), { status: 422 });
- }
-
- return new Response(null, { status: 500 });
- }
-}
diff --git a/app/api/og/route.tsx b/app/api/og/route.tsx
deleted file mode 100644
index 493d40b7..00000000
--- a/app/api/og/route.tsx
+++ /dev/null
@@ -1,154 +0,0 @@
-import { capitalize } from "@/lib/utils";
-import { ImageResponse } from "next/og";
-
-export const runtime = "edge";
-
-const inter600 = fetch(
- new URL(`../../../assets/fonts/Inter-SemiBold.ttf`, import.meta.url),
-).then((res) => res.arrayBuffer());
-
-const inter700 = fetch(
- new URL(`../../../assets/fonts/Inter-Bold.ttf`, import.meta.url),
-).then((res) => res.arrayBuffer());
-
-const image = fetch(
- new URL("../../../assets/images/og-bg-2.jpg", import.meta.url),
-).then((res) => res.arrayBuffer());
-
-const logo = fetch(new URL("../../../app/icon.png", import.meta.url)).then(
- (res) => res.arrayBuffer(),
-);
-
-export async function GET(req: Request) {
- const imageData = await image;
- const logoData = await logo;
-
- const url = new URL(req.url);
- const params = Object.fromEntries(url.searchParams);
- const title = capitalize(
- (params.title || "Magic UI")
- .replace(/-/g, " ")
- .split(" ")
- .slice(0, 3)
- .join(" ")
- .substring(0, 20),
- );
-
- try {
- return new ImageResponse(
- (
- <div tw="flex justify-center flex-col relative w-full h-full items-center bg-white">
- <img
- tw="absolute inset-0 w-full h-full"
- alt={title}
- // @ts-ignore
- src={imageData}
- />
-
- {/* Lighting Effects */}
- {/* <div
- style={{
- position: "absolute",
- inset: 0,
- width: "100%",
- height: "100%",
- backgroundImage:
- "radial-gradient(circle at 0% 15%, #FFBD7A22, rgba(0,0,0,0) 40%), radial-gradient(circle at 100% 85%, #9E7AFF22,rgba(0,0,0,0) 40%)",
- }}
- ></div> */}
-
- <h1 tw="absolute inset-0 flex justify-center items-center mb-57 flex-row">
- <img
- tw="h-10 w-10"
- alt={title}
- // @ts-ignore
- src={logoData}
- />
- <span
- tw="ml-3"
- style={{
- background:
- // "linear-gradient(180deg,rgba(240,238,249,.8) 0%,#E2E8FF 100%)",
- "linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(156, 163, 175, 1) 100%)",
- backgroundClip: "text",
- WebkitBackgroundClip: "text",
- color: "transparent",
- fontSize: 35,
- letterSpacing: "-1.5px",
- ...font("Inter 700"),
- }}
- >
- Magic UI
- </span>
- </h1>
-
- {title && (
- <p
- style={{
- position: "absolute",
- whiteSpace: "pre-wrap",
- // background:
- // "linear-gradient(180deg,rgba(240,238,249,.8) 0%,#E2E8FF 100%)",
- // background:
- // "linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(156, 163, 175, 0.6) 100%)",
- background:
- "linear-gradient(315deg,#9E7AFF 0%,#FE8BBB 33.33%,#FFBD7A 66.67%,#F8EAC3 100%)",
- backgroundClip: "text",
- WebkitBackgroundClip: "text",
- textAlign: "center",
- fontSize: 100,
- letterSpacing: "-10px",
- color: "transparent",
- WebkitTextFillColor: "transparent",
- ...font("Inter 600"),
- }}
- >
- {title}
- </p>
- )}
-
- <h1 tw="absolute inset-0 flex justify-center items-center mt-57 flex-col">
- <span
- style={{
- background:
- "linear-gradient(180deg, rgba(255,255,255,1) 0%, rgba(156, 163, 175, 1) 100%)",
- // "linear-gradient(180deg,rgba(240,238,249,.8) 0%,#E2E8FF 100%)",
- backgroundClip: "text",
- WebkitBackgroundClip: "text",
- color: "transparent",
- fontSize: 25,
- letterSpacing: "-1.5px",
- ...font("Inter 700"),
- }}
- >
- Create magical landing pages in minutes.
- </span>
- </h1>
- </div>
- ),
- {
- width: 1200,
- height: 630,
- fonts: [
- {
- name: "Inter 600",
- data: await inter600,
- },
- {
- name: "Inter 700",
- data: await inter700,
- },
- ],
- },
- );
- } catch (e: any) {
- console.log(`${e.message}`);
- return new Response(`Failed to generate the image`, {
- status: 500,
- });
- }
-}
-
-function font(fontFamily: string) {
- return { fontFamily };
-}
diff --git a/app/api/repo/commits/route.ts b/app/api/repo/commits/route.ts
deleted file mode 100644
index 0362418e..00000000
--- a/app/api/repo/commits/route.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { NextRequest, NextResponse } from "next/server";
-import { Octokit } from "octokit";
-import { z } from "zod";
-
-const octokit = new Octokit({
- auth: process.env.GITHUB_ACCESS_TOKEN,
-});
-
-const bodySchema = z.object({
- owner: z.string(),
- repo: z.string(),
-});
-
-export async function POST(request: NextRequest) {
- const body = await request.json();
- try {
- const { owner, repo } = bodySchema.parse(body);
-
- const response = await octokit.request(
- "GET /repos/{owner}/{repo}/commits",
- {
- owner,
- repo,
- per_page: 5,
- },
- );
-
- return NextResponse.json({ success: true, commits: response.data });
- } catch (error: any) {
- return NextResponse.json(
- { success: false, error: error.message },
- { status: 500 },
- );
- }
-}
diff --git a/app/api/repo/download/route.ts b/app/api/repo/download/route.ts
deleted file mode 100644
index 5bef5c78..00000000
--- a/app/api/repo/download/route.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { octokit } from "@/lib/octokit";
-import { NextRequest, NextResponse } from "next/server";
-import { z } from "zod";
-
-const bodySchema = z.object({
- owner: z.string(),
- repo: z.string(),
-});
-
-export async function POST(request: NextRequest) {
- const body = await request.json();
- try {
- const { owner, repo } = bodySchema.parse(body);
- const response = await octokit.request(
- "GET /repos/{owner}/{repo}/zipball",
- {
- owner: owner,
- repo: repo,
- headers: {
- "X-GitHub-Api-Version": "2022-11-28",
- },
- },
- );
- const status = response.status;
- const downloadUrl = response.url;
- return NextResponse.json({ success: true, status, downloadUrl });
- } catch (error: any) {
- return NextResponse.json(
- { success: false, error: error.message },
- { status: 500 },
- );
- }
-}
diff --git a/app/api/repo/invite/route.ts b/app/api/repo/invite/route.ts
deleted file mode 100644
index 69559057..00000000
--- a/app/api/repo/invite/route.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import { octokit } from "@/lib/octokit";
-import { NextRequest, NextResponse } from "next/server";
-import { z } from "zod";
-
-const bodySchema = z.object({
- owner: z.string(),
- repo: z.string(),
- username: z.string(),
-});
-
-export async function POST(request: NextRequest) {
- const body = await request.json();
- try {
- const { owner, repo, username } = bodySchema.parse(body);
- const response = await octokit.request(
- "PUT /repos/{owner}/{repo}/collaborators/{username}",
- {
- owner,
- repo,
- username,
- permission: "read",
- headers: {
- "X-GitHub-Api-Version": "2022-11-28",
- },
- },
- );
-
- const status = response.status;
- return NextResponse.json({ success: true, status });
- } catch (error: any) {
- console.log(error.response.data);
- return NextResponse.json(
- { success: false, error: error.message },
- { status: 500 },
- );
- }
-}
diff --git a/app/api/tweet/[id]/route.ts b/app/api/tweet/[id]/route.ts
deleted file mode 100644
index c241a4f1..00000000
--- a/app/api/tweet/[id]/route.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { getTweet } from "react-tweet/api";
-import { z } from "zod";
-
-const schema = z.object({
- params: z.object({
- id: z.string(),
- }),
-});
-
-export async function GET(req: Request, context: z.infer<typeof schema>) {
- try {
- const { params } = schema.parse(context);
- const tweet = await getTweet(params.id);
- console.log(params.id);
-
- if (tweet) {
- return new Response(JSON.stringify({ data: tweet }));
- } else {
- return new Response(null, { status: 404 });
- }
- } catch (error) {
- if (error instanceof z.ZodError) {
- return new Response(JSON.stringify(error.issues), { status: 422 });
- }
-
- console.error(error);
- return new Response(null, { status: 500 });
- }
-}
diff --git a/app/api/users/[userId]/route.ts b/app/api/users/[userId]/route.ts
deleted file mode 100644
index b6b528cd..00000000
--- a/app/api/users/[userId]/route.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import { authOptions } from "@/lib/auth";
-import { db } from "@/lib/db";
-import { userNameSchema } from "@/lib/validations/user";
-import { getServerSession } from "next-auth/next";
-import { z } from "zod";
-
-const routeContextSchema = z.object({
- params: z.object({
- userId: z.string(),
- }),
-});
-
-export async function PATCH(
- req: Request,
- context: z.infer<typeof routeContextSchema>,
-) {
- try {
- // Validate the route context.
- const { params } = routeContextSchema.parse(context);
-
- // Ensure user is authentication and has access to this user.
- const session = await getServerSession(authOptions);
- if (!session?.user || params.userId !== session?.user.id) {
- return new Response(null, { status: 403 });
- }
-
- // Get the request body and validate it.
- const body = await req.json();
- const payload = userNameSchema.parse(body);
-
- // Update the user.
- await db.user.update({
- where: {
- id: session.user.id,
- },
- data: {
- name: payload.name,
- },
- });
-
- return new Response(null, { status: 200 });
- } catch (error) {
- if (error instanceof z.ZodError) {
- return new Response(JSON.stringify(error.issues), { status: 422 });
- }
-
- return new Response(null, { status: 500 });
- }
-}
diff --git a/app/api/webhooks/stripe/route.ts b/app/api/webhooks/stripe/route.ts
deleted file mode 100644
index bbe9108a..00000000
--- a/app/api/webhooks/stripe/route.ts
+++ /dev/null
@@ -1,104 +0,0 @@
-import { env } from "@/env.mjs";
-import { stripe } from "@/lib/stripe";
-import { upsertCustomer, upsertPayment } from "@/lib/stripe-utils";
-import { headers } from "next/headers";
-import Stripe from "stripe";
-
-const relevantEvents = new Set([
- // "product.created",
- // "product.updated",
- // "price.created",
- // "price.updated",
- "customer.created",
- "checkout.session.completed",
- // "customer.subscription.created",
- // "customer.subscription.updated",
- // "customer.subscription.deleted",
-]);
-
-export async function POST(req: Request) {
- const body = await req.text();
- const sig = headers().get("Stripe-Signature") as string;
- const webhookSecret = env.STRIPE_WEBHOOK_SECRET;
- let event: Stripe.Event;
-
- try {
- if (!sig || !webhookSecret) return;
- event = stripe.webhooks.constructEvent(body, sig, webhookSecret);
- } catch (err: any) {
- console.log(`❌ Error message: ${err.message}`);
- return new Response(`Webhook Error: ${err.message}`, { status: 400 });
- }
-
- if (relevantEvents.has(event.type)) {
- try {
- switch (event.type) {
- // case 'product.created':
- // case 'product.updated':
- // await upsertProductRecord(event.data.object as Stripe.Product);
- // break;
- // case 'price.created':
- // case 'price.updated':
- // await upsertPriceRecord(event.data.object as Stripe.Price);
- // break;
- // case 'customer.subscription.created':
- // case 'customer.subscription.updated':
- // case 'customer.subscription.deleted':
- // const subscription = event.data.object as Stripe.Subscription;
- // await manageSubscriptionStatusChange(
- // subscription.id,
- // subscription.customer as string,
- // event.type === 'customer.subscription.created'
- // );
- // break;
-
- case "customer.created":
- const customer = event.data.object as Stripe.Customer;
- console.log("Customer: ", customer);
- break;
- case "checkout.session.completed":
- const session = event.data.object as Stripe.Checkout.Session;
- if (session.mode === "subscription") {
- // const subscriptionId = session.subscription;
- // await manageSubscriptionStatusChange(
- // subscriptionId as string,
- // session.customer as string,
- // true
- // );
- } else if (session.mode === "payment") {
- if (!session.customer_details?.email) {
- throw new Error("No email provided");
- }
- const customer = await upsertCustomer(
- session.customer_details.email.toLowerCase(),
- session.customer_details.name || "",
- );
- await upsertPayment(session.payment_intent as string, customer.id);
-
- console.log("Login Link");
-
- // await signIn("email", {
- // email: session.customer_details.email,
- // });
-
- // await sendLoginEmail({
- // email: session.customer_details.email,
- // url: "https://magicuikit.com",
- // });
-
- // await sendLoginEmail(session.customer_details.email);
- }
- break;
- default:
- throw new Error("Unhandled relevant event!");
- }
- } catch (error) {
- console.log(error);
- return new Response("Webhook handler failed. View logs.", {
- status: 400,
- });
- }
- }
-
- return new Response(null, { status: 200 });
-}
diff --git a/app/layout.tsx b/app/layout.tsx
index e1821c9f..2eec2fff 100644
--- a/app/layout.tsx
+++ b/app/layout.tsx
@@ -1,5 +1,4 @@
import { Analytics } from "@/components/analytics";
-import { CrispChat } from "@/components/crisp-chat";
import PosthogIdentify from "@/components/posthog-identify";
import { PHProvider } from "@/components/posthog-provider";
import SessionProvider from "@/components/session-provider";
@@ -11,7 +10,6 @@ import { absoluteUrl, cn, constructMetadata } from "@/lib/utils";
import "@/styles/globals.css";
import "@/styles/mdx.css";
import { Metadata } from "next";
-import { cookies } from "next/headers";
export const metadata: Metadata = constructMetadata({
title: "Magic UI",
@@ -25,10 +23,6 @@ export default function RootLayout({
}: {
children: React.ReactNode;
}) {
- const cookieStore = cookies();
- const isNewVisitor =
- cookieStore.get("__Host-next-auth.csrf-token") === undefined;
-
return (
<html lang="en" suppressHydrationWarning>
<head />
@@ -44,10 +38,8 @@ export default function RootLayout({
<TooltipProvider>
{children}
<PosthogIdentify />
- <CrispChat isNewVisitor={isNewVisitor} />
<Toaster />
<Analytics />
- {/* <TailwindIndicator /> */}
</TooltipProvider>
</ThemeProvider>
</SessionProvider>
diff --git a/app/sitemap.ts b/app/sitemap.ts
index d96a63b2..8c0bfdbd 100644
--- a/app/sitemap.ts
+++ b/app/sitemap.ts
@@ -12,10 +12,6 @@ export default function sitemap(): MetadataRoute.Sitemap {
url: `${protocol}://${domain}`,
lastModified: new Date(),
},
- {
- url: `${protocol}://${domain}/pricing`,
- lastModified: new Date(),
- },
...allPages.map((post) => ({
url: `${protocol}://${domain}/${post.slugAsParams}`,
lastModified: new Date(),
diff --git a/components/author.tsx b/components/author.tsx
deleted file mode 100644
index fe1c32ee..00000000
--- a/components/author.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import Image from "next/image";
-import Link from "next/link";
-
-export interface AuthorProps {
- _id: string;
- title: string;
- twitter: string;
- avatar: string;
-}
-
-const Author = ({ author }: { author: AuthorProps }) => (
- <div className="mt-4 flex space-x-4">
- <Link
- key={author._id}
- href={`https://twitter.com/${author.twitter}`}
- className="flex items-center space-x-2 text-sm"
- >
- <Image
- src={author.avatar}
- alt={author.title}
- width={42}
- height={42}
- className="rounded-full bg-white"
- />
- <div className="flex-1 text-left leading-tight">
- <p className="font-medium">{author.title}</p>
- <p className="text-[12px] text-muted-foreground">@{author.twitter}</p>
- </div>
- </Link>
- </div>
-);
-
-export default Author;
diff --git a/components/block-preview.tsx b/components/block-preview.tsx
deleted file mode 100644
index 970008d3..00000000
--- a/components/block-preview.tsx
+++ /dev/null
@@ -1,192 +0,0 @@
-"use client";
-
-import BlockWrapper from "@/components/block-wrapper";
-import ComponentWrapper from "@/components/component-wrapper";
-import { Icons } from "@/components/icons";
-import { Badge } from "@/components/ui/badge";
-import { Separator } from "@/components/ui/separator";
-import { Skeleton } from "@/components/ui/skeleton";
-import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";
-import { cn, fetcher } from "@/lib/utils";
-import { registry } from "@/registry";
-import { LockClosedIcon } from "@radix-ui/react-icons";
-import { useSession } from "next-auth/react";
-import Link from "next/link";
-import * as React from "react";
-import useSWR from "swr";
-
-interface BlockPreviewProps extends React.HTMLAttributes<HTMLDivElement> {
- name: string;
- align?: "center" | "start" | "end";
- free?: boolean;
- scroller?: boolean;
-}
-
-export function BlockPreview({
- name,
- children,
- className,
- align = "start",
- free = false,
- scroller = false,
- ...props
-}: BlockPreviewProps) {
- const { data: session, status } = useSession();
- const [paywall, setPaywall] = React.useState(false);
- const { data, isLoading } = useSWR(
- status === "authenticated" && "/api/me",
- fetcher,
- );
-
- const Codes = React.Children.toArray(children) as React.ReactElement[];
- const Code = Codes[0]; // first child
-
- const Preview = React.useMemo(() => {
- const Component = registry[name]?.component;
-
- if (!Component) {
- return (
- <p className="text-sm text-muted-foreground">
- Component{" "}
- <code className="relative rounded bg-muted px-[0.3rem] py-[0.2rem] font-mono text-sm">
- {name}
- </code>{" "}
- not found in registry.
- </p>
- );
- }
-
- return <Component />;
- }, [name]);
-
- React.useEffect(() => {
- const shouldShowPaywall =
- (!free && status === "unauthenticated") ||
- (data?.user?.customer?.payments?.length === 0 &&
- data?.user?.role !== "ADMIN");
- setPaywall(shouldShowPaywall);
- }, [free, status, data]);
-
- if (status === "loading") return null;
- if (isLoading) return null;
-
- function humanize(name: string): string {
- return name
- .replace(/-/g, " ")
- .replace(/([A-Z])/g, " $1")
- .trim()
- .split(/\s+/)
- .map((word) => word[0].toUpperCase() + word.substring(1).toLowerCase())
- .join(" ");
- }
-
- return (
- <div
- className={cn(
- "not-prose relative my-4 flex flex-col space-y-2 lg:max-w-[120ch]",
- className,
- )}
- {...props}
- >
- <Tabs defaultValue="preview" className="relative mr-auto w-full">
- <div className="flex items-center justify-between">
- {paywall && (
- <>
- <div className="flex flex-row gap-2">
- <h2 className="text-xl font-semibold text-primary">
- {humanize(name)}
- </h2>
- <Badge
- variant="secondary"
- className="hidden tracking-normal text-foreground md:inline-flex"
- >
- Preview
- </Badge>
- </div>
- <Link
- href={"/pricing"}
- className={cn(
- "group relative flex flex-row items-center justify-center gap-2 text-sm font-medium",
- "rounded-2xl px-4 py-1.5 text-sm font-medium shadow-[inset_0_-8px_10px_#8fdfff1f]",
- "transition-shadow duration-500 ease-out hover:shadow-[inset_0_-5px_10px_#8fdfff3f]",
- )}
- >
- <div
- className={cn(
- `absolute inset-0 block h-full w-full animate-gradient bg-gradient-to-r from-[#ffaa40]/50 via-[#9c40ff]/50 to-[#ffaa40]/50 bg-[length:var(--bg-size)_100%] [border-radius:inherit] [mask:linear-gradient(#fff_0_0)_content-box,linear-gradient(#fff_0_0)]`,
- `p-[1px] ![mask-composite:subtract]`,
- )}
- />
- <LockClosedIcon className="size-4 text-[#ffaa40]" />
- <Separator className="h-4" orientation="vertical" />{" "}
- <span
- className={cn(
- `inline animate-gradient whitespace-pre bg-gradient-to-r from-[#ffaa40] via-[#9c40ff] to-[#ffaa40] bg-[length:var(--bg-size)_100%] bg-clip-text text-transparent [--bg-size:300%]`,
- )}
- >
- Get the code
- </span>
- <Icons.chevronRight className="text-[#9c40ff]" />
- </Link>
- </>
- )}
- {!paywall && (
- <>
- <h2 className="text-xl font-semibold text-primary">
- {humanize(name)}
- </h2>
- <TabsList>
- <TabsTrigger value="preview">Preview</TabsTrigger>
- <TabsTrigger value="code">Code</TabsTrigger>
- </TabsList>
- </>
- )}
- </div>
- <TabsContent value="preview" className="relative rounded-md">
- {align === "center" ? (
- <ComponentWrapper>
- <React.Suspense
- fallback={
- <div className="space-y-4">
- <Skeleton className="h-[150px] w-full" />
- </div>
- }
- >
- {scroller && (
- <div className="max-h-[450px] overflow-y-scroll">
- <div className="h-screen">{Preview}</div>
- </div>
- )}
- {!scroller && Preview}
- </React.Suspense>
- </ComponentWrapper>
- ) : (
- <BlockWrapper>
- <React.Suspense
- fallback={
- <div className="space-y-4">
- <Skeleton className="h-[150px] w-full" />
- </div>
- }
- >
- {scroller && (
- <div className="max-h-[450px] overflow-y-scroll">
- <div className="h-screen">{Preview}</div>
- </div>
- )}
- {!scroller && Preview}
- </React.Suspense>
- </BlockWrapper>
- )}
- </TabsContent>
- <TabsContent value="code">
- <div className="flex flex-col space-y-4">
- <div className="w-full rounded-md [&_pre]:my-0 [&_pre]:overflow-auto">
- {Code}
- </div>
- </div>
- </TabsContent>
- </Tabs>
- </div>
- );
-}
diff --git a/components/block-wrapper.tsx b/components/block-wrapper.tsx
deleted file mode 100644
index db502449..00000000
--- a/components/block-wrapper.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import { cn } from "@/lib/utils";
-
-interface ComponentWrapperProps {
- className?: string;
- children: any;
-}
-const BlockWrapper = ({ className, children }: ComponentWrapperProps) => {
- return (
- <div
- className={cn(
- "not-prose relative overflow-hidden rounded-xl border bg-background p-0",
- className,
- )}
- >
- {children}
- </div>
- );
-};
-
-export default BlockWrapper;
diff --git a/components/component-source.tsx b/components/component-source.tsx
index db110b09..97e24e0b 100644
--- a/components/component-source.tsx
+++ b/components/component-source.tsx
@@ -1,7 +1,6 @@
"use client";
import { CodeBlockWrapper } from "@/components/code-block-wrapper";
-import PreOrder from "@/components/preorder";
import { cn } from "@/lib/utils";
import * as React from "react";
@@ -9,40 +8,16 @@ interface ComponentSourceProps extends React.HTMLAttributes<HTMLDivElement> {
src: string;
}
-const Preview = ({ className }: { className?: string }) => {
- return (
- <>
- <PreOrder />
- </>
- );
-};
-
export function ComponentSource({
children,
className,
...props
}: ComponentSourceProps) {
- // const { data: session, status } = useSession();
- // const { data, isLoading } = useSWR(
- // status === "authenticated" && "/api/me",
- // fetcher,
- // );
-
- // if (status === "loading") return null;
- // if (status === "unauthenticated") return <Preview />;
- // if (isLoading) return null;
-
- // TODO: Make this cleaner
- // if (
- // data?.user?.customer?.payments.length === 0 &&
- // data?.user.role !== "ADMIN"
- // )
- // return <Preview />;
-
return (
<CodeBlockWrapper
expandButtonTitle="Expand"
className={cn("my-6 overflow-hidden rounded-md", className)}
+ {...props}
>
{children}
</CodeBlockWrapper>
diff --git a/components/crisp-chat.tsx b/components/crisp-chat.tsx
deleted file mode 100644
index 3edba18e..00000000
--- a/components/crisp-chat.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-"use client";
-
-import { Crisp } from "crisp-sdk-web";
-import { useSession } from "next-auth/react";
-import { useEffect } from "react";
-
-export function CrispChat({ isNewVisitor }: { isNewVisitor: boolean }) {
- const { data: session } = useSession();
-
- useEffect(() => {
- Crisp.configure("5a280d36-3e81-4bbe-89a7-787f6b34b481", {
- autoload: false,
- });
-
- Crisp.chat.show();
-
- if (session?.user?.email) {
- Crisp.user.setEmail(session.user.email);
- Crisp.user.setNickname(session.user.name || session.user.email);
- }
-
- if (!localStorage.getItem("crispMessageShown")) {
- const timeoutId1 = setTimeout(() => {
- Crisp.message.show("text", "hi there! can i help with anything?");
- localStorage.setItem("crispMessageShown", "true");
- }, 1000);
-
- // Cleanup function to clear timeouts
- return () => {
- clearTimeout(timeoutId1);
- };
- }
- }, [session, isNewVisitor]);
-
- return null;
-}
diff --git a/components/dashboard/header.tsx b/components/dashboard/header.tsx
deleted file mode 100644
index b1a41462..00000000
--- a/components/dashboard/header.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-interface DashboardHeaderProps {
- heading: string;
- text?: string;
- children?: React.ReactNode;
-}
-
-export function DashboardHeader({
- heading,
- text,
- children,
-}: DashboardHeaderProps) {
- return (
- <div className="flex items-center justify-between px-2">
- <div className="grid gap-1">
- <h1 className="font-heading text-3xl md:text-4xl">{heading}</h1>
- {text && <p className="text-lg text-muted-foreground">{text}</p>}
- </div>
- {children}
- </div>
- );
-}
diff --git a/components/dashboard/nav.tsx b/components/dashboard/nav.tsx
deleted file mode 100644
index 88033de1..00000000
--- a/components/dashboard/nav.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-"use client";
-
-import Link from "next/link";
-import { usePathname } from "next/navigation";
-
-import { Icons } from "@/components/icons";
-import { cn } from "@/lib/utils";
-import { SidebarNavItem } from "types";
-
-interface DashboardNavProps {
- items: SidebarNavItem[];
-}
-
-export function DashboardNav({ items }: DashboardNavProps) {
- const path = usePathname();
-
- if (!items?.length) {
- return null;
- }
-
- return (
- <nav className="grid items-start gap-2">
- {items.map((item, index) => {
- const Icon = Icons[item.icon || "arrowRight"];
- return (
- item.href && (
- <Link key={index} href={item.disabled ? "/" : item.href}>
- <span
- className={cn(
- "group flex items-center rounded-md px-3 py-2 text-sm font-medium hover:bg-accent hover:text-accent-foreground",
- path === item.href ? "bg-accent" : "transparent",
- item.disabled && "cursor-not-allowed opacity-80",
- )}
- >
- <Icon className="mr-2 h-4 w-4" />
- <span>{item.title}</span>
- </span>
- </Link>
- )
- );
- })}
- </nav>
- );
-}
diff --git a/components/dashboard/order-list.tsx b/components/dashboard/order-list.tsx
deleted file mode 100644
index e7d6f3dd..00000000
--- a/components/dashboard/order-list.tsx
+++ /dev/null
@@ -1,96 +0,0 @@
-"use client";
-
-import { Badge } from "@/components/ui/badge";
-import {
- Card,
- CardContent,
- CardDescription,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card";
-import {
- Table,
- TableBody,
- TableCell,
- TableHead,
- TableHeader,
- TableRow,
-} from "@/components/ui/table";
-import { cn } from "@/lib/utils";
-import { UserPayments } from "@/types";
-import { Payment } from "@prisma/client";
-import Link from "next/link";
-import { HTMLAttributes } from "react";
-import { buttonVariants } from "../ui/button";
-
-interface OrderListProps extends HTMLAttributes<HTMLFormElement> {
- payments: UserPayments;
-}
-
-export function OrderList({ payments, className, ...props }: OrderListProps) {
- return (
- <Card>
- <CardHeader>
- <CardTitle>Orders</CardTitle>
- <CardDescription>
- You have {payments.payments.length}{" "}
- {payments.payments.length === 1 ? "order" : "orders"}.
- </CardDescription>
- </CardHeader>
-
- <CardContent>
- <Table>
- <TableHeader>
- <TableRow>
- <TableHead>Name</TableHead>
- <TableHead>Status</TableHead>
- <TableHead>Amount</TableHead>
- <TableHead className="text-right">Reciept</TableHead>
- </TableRow>
- </TableHeader>
- <TableBody>
- {payments.payments.map((payment: Payment) => (
- <TableRow key={payment.id}>
- <TableCell className="font-medium">
- <div className="flex flex-col gap-2">
- <CardTitle>Magic UI Pre-order (x1)</CardTitle>
- </div>
- </TableCell>
- <TableCell>
- <Badge
- variant={"outline"}
- className={cn(
- payment.status === "succeeded" && " bg-green-400/40",
- payment.status === "failed" && " bg-red-400/40",
- )}
- >
- {payment.status}
- </Badge>
- </TableCell>
- <TableCell>
- {Intl.NumberFormat("en-US", {
- style: "currency",
- currency: payment.currency,
- }).format(payment.amount / 100)}
- </TableCell>
- <TableCell className="whitespace-wrap text-right">
- {payment.status === "succeeded" && payment.receiptUrl && (
- <Link
- className={cn(
- buttonVariants({ size: "sm", variant: "default" }),
- "text-sm",
- )}
- href={payment.receiptUrl || ""}
- >
- See reciept
- </Link>
- )}
- </TableCell>
- </TableRow>
- ))}
- </TableBody>
- </Table>
- </CardContent>
- </Card>
- );
-}
diff --git a/components/dashboard/shell.tsx b/components/dashboard/shell.tsx
deleted file mode 100644
index fe9ffd1e..00000000
--- a/components/dashboard/shell.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import * as React from "react";
-
-import { cn } from "@/lib/utils";
-
-interface DashboardShellProps extends React.HTMLAttributes<HTMLDivElement> {}
-
-export function DashboardShell({
- children,
- className,
- ...props
-}: DashboardShellProps) {
- return (
- <div className={cn("grid items-start gap-8", className)} {...props}>
- {children}
- </div>
- );
-}
diff --git a/components/dashboard/user-profile-form.tsx b/components/dashboard/user-profile-form.tsx
deleted file mode 100644
index 6af1fe2f..00000000
--- a/components/dashboard/user-profile-form.tsx
+++ /dev/null
@@ -1,158 +0,0 @@
-"use client";
-
-import { Icons } from "@/components/icons";
-import { buttonVariants } from "@/components/ui/button";
-import {
- Card,
- CardContent,
- CardDescription,
- CardFooter,
- CardHeader,
- CardTitle,
-} from "@/components/ui/card";
-import {
- Form,
- FormControl,
- FormDescription,
- FormField,
- FormItem,
- FormLabel,
- FormMessage,
-} from "@/components/ui/form";
-import { Input } from "@/components/ui/input";
-import { cn, fetcher } from "@/lib/utils";
-import { userNameSchema } from "@/lib/validations/user";
-import { zodResolver } from "@hookform/resolvers/zod";
-import { useSession } from "next-auth/react";
-import { useRouter } from "next/navigation";
-import { HTMLAttributes, useState } from "react";
-import { useForm } from "react-hook-form";
-import { toast } from "sonner";
-import useSWR from "swr";
-import * as z from "zod";
-
-interface UserProfileFormProps extends HTMLAttributes<HTMLFormElement> {
- // user: Pick<User, "id" | "name">;
-}
-
-type FormData = z.infer<typeof userNameSchema>;
-
-export function UserProfileForm({ className, ...props }: UserProfileFormProps) {
- const { data: session, status } = useSession();
- const { data, isLoading } = useSWR(
- status === "authenticated" && "/api/me",
- fetcher,
- );
-
- const user = data?.user || null;
-
- const router = useRouter();
- const form = useForm<FormData>({
- resolver: zodResolver(userNameSchema),
- defaultValues: {
- name: user?.name || "",
- },
- });
- const [isSaving, setIsSaving] = useState<boolean>(false);
-
- async function onSubmit(data: FormData) {
- setIsSaving(true);
-
- const response = await fetch(`/api/users/${user?.id}`, {
- method: "PATCH",
- headers: {
- "Content-Type": "application/json",
- },
- body: JSON.stringify({
- name: data.name,
- }),
- });
-
- setIsSaving(false);
-
- if (!response?.ok) {
- toast.error("Something went wrong.", {
- description: "Your profile was not updated. Please try again.",
- });
- }
-
- toast.success("Your profile has been updated.");
-
- router.refresh();
- }
-
- if (status === "loading") return null;
- if (isLoading) return null;
- if (!user) return null;
-
- console.log(user);
-
- return (
- <Form {...form}>
- <form
- className={cn(className)}
- onSubmit={form.handleSubmit(onSubmit)}
- {...props}
- >
- <Card className="shadow-none">
- <CardHeader>
- <CardTitle>Your Name</CardTitle>
- <CardDescription>
- Please enter your full name or a display name you are comfortable
- with.
- </CardDescription>
- </CardHeader>
- <CardContent>
- <div className="grid gap-1">
- <FormField
- control={form.control}
- name="name"
- render={({ field }) => (
- <FormItem>
- <FormLabel>Name</FormLabel>
- <FormControl>
- <Input
- id="name"
- className="w-[400px]"
- size={32}
- {...field}
- />
- </FormControl>
- <FormDescription>This is your display name</FormDescription>
- <FormMessage />
- </FormItem>
- )}
- />
- </div>
-
- {/* <Button
- type="button" // This already ensures the button does not trigger form submit
- className="gap-2"
- onClick={async (e) => {
- e.preventDefault(); // Explicitly prevent form submission
- await signIn("github", {
- callbackUrl: "/dashboard/settings",
- });
- }}
- >
- Connect to Github
- <GitHubLogoIcon className="h-4 w-4" />
- </Button> */}
- </CardContent>
- <CardFooter>
- <button
- type="submit"
- className={cn(buttonVariants(), className)}
- disabled={isSaving}
- >
- {isSaving && (
- <Icons.spinner className="mr-2 h-4 w-4 animate-spin" />
- )}
- <span>Save</span>
- </button>
- </CardFooter>
- </Card>
- </form>
- </Form>
- );
-}
diff --git a/components/github-invite.tsx b/components/github-invite.tsx
deleted file mode 100644
index f2e3e76d..00000000
--- a/components/github-invite.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-"use client";
-
-import { Icons } from "@/components/icons";
-import { Button } from "@/components/ui/button";
-import { Download } from "lucide-react";
-import { useState } from "react";
-import { toast } from "sonner";
-
-export default function GithubInvite({
- repo,
- owner,
- username,
-}: {
- repo: string;
- owner: string;
- username: string;
-}) {
- const [loading, setLoading] = useState(false);
-
- const handleDownload = async () => {
- setLoading(true);
-
- try {
- const response = await fetch(
- `${process.env.NEXT_PUBLIC_APP_URL}/api/repo/invite`,
- {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- body: JSON.stringify({ repo, owner, username }),
- },
- );
- if (!response.ok) {
- throw new Error(`HTTP error! status: ${response.status}`);
- }
- const data = await response.json();
- console.log(data);
- } catch (error) {
- toast.error("Error occured while downloading. Please try again.");
- console.error("error", error);
- } finally {
- setLoading(false);
- }
- };
-
- return (
- <>
- <Button
- onClick={handleDownload}
- disabled={loading}
- className="not-prose group relative w-full gap-2"
- >
- {loading ? "Downloading" : "Download"}
- {!loading && <Download className="h-4 w-4" />}
- {loading && <Icons.spinner className="h-4 w-4 animate-spin" />}
- </Button>
- </>
- );
-}
diff --git a/components/icons/facebook.tsx b/components/icons/facebook.tsx
deleted file mode 100644
index 76f24314..00000000
--- a/components/icons/facebook.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-export default function Facebook({
- className,
- fill = "#1977f3",
-}: {
- className?: string;
- fill?: string;
-}) {
- return (
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="1365.12"
- height="1365.12"
- viewBox="0 0 14222 14222"
- className={className}
- >
- <path
- d="M9879 9168l315-2056H8222V5778c0-562 275-1111 1159-1111h897V2917s-814-139-1592-139c-1624 0-2686 984-2686 2767v1567H4194v2056h1806v4969c362 57 733 86 1111 86s749-30 1111-86V9168z"
- fill="currentColor"
- />
- </svg>
- );
-}
diff --git a/components/icons/github.tsx b/components/icons/github.tsx
deleted file mode 100644
index ff13f393..00000000
--- a/components/icons/github.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-export default function Github({ className }: { className?: string }) {
- return (
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="20"
- height="20"
- fill="currentColor"
- viewBox="0 0 24 24"
- className={className}
- >
- <path d="M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z" />
- </svg>
- );
-}
diff --git a/components/icons/linkedin.tsx b/components/icons/linkedin.tsx
deleted file mode 100644
index c6c6b7d0..00000000
--- a/components/icons/linkedin.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-export default function LinkedIn({
- className,
- fill = "#027ab5",
-}: {
- className?: string;
- fill?: string;
-}) {
- return (
- <svg
- xmlns="http://www.w3.org/2000/svg"
- width="24"
- height="24"
- viewBox="0 0 24 24"
- className={className}
- >
- <path
- fill="currentColor"
- d="M19 0h-14c-2.761 0-5 2.239-5 5v14c0 2.761 2.239 5 5 5h14c2.762 0 5-2.239 5-5v-14c0-2.761-2.238-5-5-5zm-11 19h-3v-11h3v11zm-1.5-12.268c-.966 0-1.75-.79-1.75-1.764s.784-1.764 1.75-1.764 1.75.79 1.75 1.764-.783 1.764-1.75 1.764zm13.5 12.268h-3v-5.604c0-3.368-4-3.113-4 0v5.604h-3v-11h3v1.765c1.396-2.586 7-2.777 7 2.476v6.759z"
- />
- </svg>
- );
-}
diff --git a/components/icons/twitter.tsx b/components/icons/twitter.tsx
deleted file mode 100644
index 693309df..00000000
--- a/components/icons/twitter.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-export default function Twitter({ className }: { className?: string }) {
- return (
- <svg
- xmlns="http://www.w3.org/2000/svg"
- viewBox="0 0 248 204"
- className={className}
- >
- <path
- fill="currentColor"
- d="M221.95 51.29c.15 2.17.15 4.34.15 6.53 0 66.73-50.8 143.69-143.69 143.69v-.04c-27.44.04-54.31-7.82-77.41-22.64 3.99.48 8 .72 12.02.73 22.74.02 44.83-7.61 62.72-21.66-21.61-.41-40.56-14.5-47.18-35.07 7.57 1.46 15.37 1.16 22.8-.87-23.56-4.76-40.51-25.46-40.51-49.5v-.64c7.02 3.91 14.88 6.08 22.92 6.32C11.58 63.31 4.74 33.79 18.14 10.71c25.64 31.55 63.47 50.73 104.08 52.76-4.07-17.54 1.49-35.92 14.61-48.25 20.34-19.12 52.33-18.14 71.45 2.19 11.31-2.23 22.15-6.38 32.07-12.26-3.77 11.69-11.66 21.62-22.2 27.93 10.01-1.18 19.79-3.86 29-7.95-6.78 10.16-15.32 19.01-25.2 26.16z"
- />
- </svg>
- );
-}
diff --git a/components/landing/buy-button.tsx b/components/landing/buy-button.tsx
deleted file mode 100644
index 2bdfa460..00000000
--- a/components/landing/buy-button.tsx
+++ /dev/null
@@ -1,70 +0,0 @@
-"use client";
-
-import { buttonVariants } from "@/components/ui/button";
-import { cn, fetcher } from "@/lib/utils";
-import { ChevronRight } from "lucide-react";
-import { useSession } from "next-auth/react";
-import Link from "next/link";
-import useSWR from "swr";
-
-const LoggedInAndPaid = ({ className }: { className?: string }) => {
- return (
- <Link
- href="/docs"
- className={cn(
- buttonVariants({
- size: "lg",
- variant: "ghost",
- }),
- "gap-2 whitespace-pre md:flex",
- "group relative w-full gap-1 overflow-hidden rounded-full text-sm font-semibold tracking-tighter",
- // "transform-gpu ring-offset-current transition-all duration-300 ease-out hover:ring-2 hover:ring-primary hover:ring-offset-2",
- )}
- >
- Get Started
- <ChevronRight className="ml-1 size-4 transition-all duration-300 ease-out group-hover:translate-x-1" />
- </Link>
- );
-};
-
-const UnPaid = ({ className }: { className?: string }) => {
- return (
- <Link
- href="/pricing"
- className={cn(
- buttonVariants({
- size: "lg",
- variant: "outline",
- }),
- "gap-2 whitespace-pre md:flex",
- "group relative w-full gap-1 overflow-hidden rounded-full text-sm font-semibold tracking-tighter",
- // "transform-gpu rounded-sm ring-offset-current transition-all duration-300 ease-out hover:ring-2 hover:ring-primary hover:ring-offset-2",
- )}
- >
- Get Magic UI Pro
- <ChevronRight className="ml-1 size-4 transition-all duration-300 ease-out group-hover:translate-x-1" />
- </Link>
- );
-};
-
-export default function BuyButton() {
- const { status } = useSession();
- const { data, isLoading } = useSWR(
- status === "authenticated" && "/api/me",
- fetcher,
- );
-
- const isUserAuthenticatedAndLoaded = status === "authenticated" && !isLoading;
- const hasMadePayments = data?.user?.customer?.payments?.length > 0;
- const isAdmin = data?.user?.role === "ADMIN";
-
- if (status === "loading" || status === "unauthenticated" || isLoading) {
- return <UnPaid />;
- }
-
- if (isUserAuthenticatedAndLoaded && (hasMadePayments || isAdmin)) {
- return <LoggedInAndPaid />;
- }
-
- return <UnPaid />;
-}
diff --git a/components/landing/changelog-section.tsx b/components/landing/changelog-section.tsx
deleted file mode 100644
index c9c03492..00000000
--- a/components/landing/changelog-section.tsx
+++ /dev/null
@@ -1,114 +0,0 @@
-"use client";
-import { motion } from "framer-motion";
-
-const timelineData = [
- {
- time: "12:05PM",
- title: 'Created "Preline in React" task',
- // content: "Find more detailed instructions here.",
- },
- {
- time: "12:05PM",
- title: "Release v5.2.0 quick bug fix 🐞",
- content: null,
- },
- {
- time: "12:05PM",
- title: "Take a break ⛳️",
- // content: "Just chill for now... 😉",
- },
- {
- time: "12:05PM",
- title: "Take a break ⛳️",
- // content: "Just chill for now... 😉",
- },
- {
- time: "12:05PM",
- title: "Take a break ⛳️",
- // content: "Just chill for now... 😉",
- },
- {
- time: "12:05PM",
- title: "Take a break ⛳️",
- // content: "Just chill for now... 😉",
- },
- {
- time: "12:05PM",
- title: 'Marked "Install Charts" completed',
- // content: "Finally! You can check it out here.",
- },
- {
- time: "12:05PM",
- title: "Take a break ⛳️",
- // content: "Just chill for now... 😉",
- },
-];
-
-const TimelineItem = ({
- time,
- icon,
- children,
-}: {
- time: string;
- icon?: React.ReactNode;
- children: React.ReactNode;
-}) => (
- <motion.div
- className="flex gap-x-3"
- variants={{
- hidden: { opacity: 0, y: -10 },
- show: { opacity: 1, y: 0, transition: { type: "spring" } },
- }}
- >
- <div className="w-16 text-end">
- <span className="text-xs text-gray-500 dark:text-gray-400">{time}</span>
- </div>
- <div className="relative after:absolute after:bottom-0 after:start-3.5 after:top-7 after:w-px after:-translate-x-[0.5px] after:bg-gray-200 last:after:hidden dark:after:bg-gray-700">
- <div className="relative z-10 flex size-7 items-center justify-center">
- <div className="size-2 rounded-full bg-gray-400 dark:bg-gray-600">
- {icon}
- </div>
- </div>
- </div>
- <div className="grow pb-4 pt-0.5">{children}</div>
- </motion.div>
-);
-
-export default function ChangelogSection() {
- return (
- <section id="changelog">
- <div className="container mx-auto max-w-2xl py-14">
- <h2 className="mb-4 text-center text-5xl font-bold tracking-tight text-foreground">
- Fast updates
- </h2>
- <h3 className="mb-8 text-center text-lg font-medium tracking-tight text-foreground/80">
- Check out our changelog
- </h3>
- <motion.div
- className="relative h-full w-full"
- initial="hidden"
- whileInView="show"
- animate="show"
- viewport={{ once: false }}
- variants={{
- hidden: {},
- show: {
- transition: {
- staggerChildren: 0.04,
- },
- },
- }}
- >
- {timelineData.map((item, idx) => (
- <TimelineItem key={idx} time={item.time}>
- <h3 className="flex gap-x-1.5 font-semibold text-gray-800 dark:text-white">
- {item.title}
- </h3>
- </TimelineItem>
- ))}
- <div className="absolute bottom-0 h-1/2 w-full bg-gradient-to-b from-transparent to-background" />
- </motion.div>
- </div>
- </section>
- );
-}
diff --git a/components/landing/cta-section.tsx b/components/landing/cta-section.tsx
index 85ef4c7e..5b675d11 100644
--- a/components/landing/cta-section.tsx
+++ b/components/landing/cta-section.tsx
@@ -1,138 +1,13 @@
import { buttonVariants } from "@/components/ui/button";
import { cn } from "@/lib/utils";
-import Marquee from "@/registry/components/magicui/marquee";
import { ChevronRight, HeartHandshake } from "lucide-react";
-const reviews = [
- {
- name: "Jack",
- username: "@jack",
- body: "I've never seen anything like this before. It's amazing. I love it.",
- img: "https://avatar.vercel.sh/jack",
- },
- {
- name: "Jill",
- username: "@jill",
- body: "I don't know what to say. I'm speechless. This is amazing.",
- img: "https://avatar.vercel.sh/jill",
- },
- {
- name: "John",
- username: "@john",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/john",
- },
- {
- name: "Jane",
- username: "@jane",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/jane",
- },
- {
- name: "Jenny",
- username: "@jenny",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/jenny",
- },
- {
- name: "James",
- username: "@james",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/james",
- },
-];
-
-const firstRow = reviews.slice(0, reviews.length / 2);
-const secondRow = reviews.slice(reviews.length / 2);
-
-const ReviewCard = ({
- img,
- name,
- username,
- body,
-}: {
- img: string;
- name: string;
- username: string;
- body: string;
-}) => {
- return (
- <figure
- className={cn(
- "relative w-64 cursor-pointer overflow-hidden rounded-[2rem] border p-4",
- // light styles
- "border-gray-950/[.1] bg-gray-950/[.01] hover:bg-gray-950/[.05]",
- // dark styles
- "dark:border-gray-50/[.1] dark:bg-gray-50/[.10] dark:hover:bg-gray-50/[.15]",
- )}
- >
- <div className="flex flex-row items-center gap-2">
- <img className="rounded-full" width="32" height="32" alt="" src={img} />
- <div className="flex flex-col">
- <figcaption className="text-sm font-medium dark:text-white">
- {name}
- </figcaption>
- <p className="text-xs font-medium dark:text-white/40">{username}</p>
- </div>
- </div>
- <blockquote className="mt-2 text-sm">{body}</blockquote>
- </figure>
- );
-};
-
export default function CTASection() {
return (
<section id="cta">
<div className="py-14">
<div className="container flex w-full flex-col items-center justify-center p-4">
<div className="relative flex w-full max-w-[1000px] flex-col items-center justify-center overflow-hidden rounded-[2rem] border p-10 py-14">
- <div className="absolute rotate-[35deg]">
- <Marquee pauseOnHover className="[--duration:20s]" repeat={3}>
- {firstRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee
- reverse
- pauseOnHover
- className="[--duration:20s]"
- repeat={3}
- >
- {secondRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee pauseOnHover className="[--duration:20s]" repeat={3}>
- {firstRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee
- reverse
- pauseOnHover
- className="[--duration:20s]"
- repeat={3}
- >
- {secondRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee pauseOnHover className="[--duration:20s]" repeat={3}>
- {firstRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee
- reverse
- pauseOnHover
- className="[--duration:20s]"
- repeat={3}
- >
- {secondRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- </div>
<div className="z-10 mx-auto size-24 rounded-[2rem] border bg-white/10 p-3 shadow-2xl backdrop-blur-md dark:bg-black/10 lg:size-32">
<HeartHandshake className="mx-auto size-16 text-black dark:text-white lg:size-24" />
</div>
diff --git a/components/landing/feature-grid.tsx b/components/landing/feature-grid.tsx
deleted file mode 100644
index d1f97937..00000000
--- a/components/landing/feature-grid.tsx
+++ /dev/null
@@ -1,102 +0,0 @@
-import { Button } from "@/components/ui/button";
-import { cn } from "@/lib/utils";
-import { ChevronRight } from "lucide-react";
-
-const features = [
- {
- name: "Graph view",
- description:
- "Visualize relationships between items in your library to find connections.",
- image:
- "https://assets.vercel.com/image/upload/v1675318695/nextjs/showcase/loom-illustration.svg",
- span: 1,
- href: "/",
- },
- {
- name: "Graph view",
- description:
- "Visualize relationships between items in your library to find connections.",
- image:
- "https://assets.vercel.com/image/upload/v1675318695/nextjs/showcase/loom-illustration.svg",
- span: 2,
- href: "/",
- },
- {
- name: "Graph view",
- description:
- "Visualize relationships between items in your library to find connections.",
- image:
- "https://assets.vercel.com/image/upload/v1675318695/nextjs/showcase/loom-illustration.svg",
- span: 2,
- href: "/",
- },
- {
- name: "Graph view",
- description:
- "Visualize relationships between items in your library to find connections.",
- image:
- "https://assets.vercel.com/image/upload/v1675318695/nextjs/showcase/loom-illustration.svg",
- span: 1,
- href: "/",
- },
-];
-
-export default async function FeatureGrid() {
- return (
- <section id={"feature-grid"} className="container mx-auto">
- <h2 className="text-base font-semibold leading-7 text-orange-600">
- {"Feature Grid"}
- </h2>
- <p className="mt-2 text-3xl font-bold tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl">
- {"Feature Grid"}
- </p>
- <p className="mt-6 text-lg leading-8 text-gray-600 dark:text-gray-400">
- {"Feature Grid"}
- </p>
- <div className="grid w-full auto-rows-[22rem] grid-cols-3 gap-y-4 md:gap-4">
- {features.map((feature) => (
- <div
- key={feature.name}
- className={cn(
- "group relative col-span-3 flex flex-col justify-between overflow-hidden rounded-xl bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)] dark:bg-neutral-900 ",
- {
- "lg:col-span-1": feature.span === 1,
- "lg:col-span-2": feature.span === 2,
- },
- )}
- >
- <div>
- <img
- className="absolute -right-20 -top-20 opacity-60"
- src={feature.image}
- />
- </div>
- <div className="p-6 transition-all duration-300 group-hover:-translate-y-10">
- <h3 className="mb-1 text-base font-medium text-neutral-700 dark:text-neutral-300">
- {feature.name}
- </h3>
-
- <p className="max-w-lg text-neutral-400">{feature.description}</p>
- </div>
-
- <div
- className={cn(
- "flex flex-row items-center justify-center transition-all duration-300 group-hover:translate-y-0 group-hover:opacity-100",
- "translate-y-10 opacity-0",
- "absolute bottom-4 w-full",
- )}
- >
- <Button variant="ghost" size="sm" asChild>
- <a href={feature.href}>
- Learn more
- <ChevronRight className="h-4 w-4" />
- </a>
- </Button>
- </div>
- <div className="pointer-events-none absolute inset-0 transition-all duration-300 group-hover:bg-black/[.03] group-hover:dark:bg-neutral-800/10" />
- </div>
- ))}
- </div>
- </section>
- );
-}
diff --git a/components/landing/feature-sections.tsx b/components/landing/feature-sections.tsx
deleted file mode 100644
index 336ac8f4..00000000
--- a/components/landing/feature-sections.tsx
+++ /dev/null
@@ -1,97 +0,0 @@
-"use client";
-
-import { Icons } from "@/components/icons";
-import { buttonVariants } from "@/components/ui/button";
-import { cn } from "@/lib/utils";
-import { List } from "lucide-react";
-import Link from "next/link";
-
-const features = [
- {
- id: "feature-openai",
- header: "Analyze",
- name: "Advanced OpenAI API Dashboard",
- description:
- "Just enter your OpenAI API key, and we fetch your data from the OpenAI API directly to create a dashboard. No need to install anything.",
- // icon: Icons.openai,
- video: "https://cdn.llm.report/openai-demo.mp4",
- cta: "Get Started",
- href: "/login",
- reverse: false,
- },
- {
- id: "feature-logs",
- header: "Optimize",
- name: "Log your prompts and completions",
- description:
- "Change 1 line in your code and start logging your API requests. Optimize your token usage and start saving money.",
- icon: List,
- video: "https://cdn.llm.report/logs-demo.mp4",
- cta: "Get Started",
- href: "/login",
- reverse: true,
- },
- {
- id: "feature-users",
- header: "Minimize",
- name: "Measure Cost Per User",
- description:
- "Analyze your cost per user and adjust your pricing to maximize revenue.",
- icon: Icons.user,
- video: "https://cdn.llm.report/users-demo.mp4",
- cta: "Get Started",
- href: "/login",
- reverse: false,
- },
-];
-
-const FeatureSections = () => {
- return (
- <>
- {features.map((feature) => (
- <section id={feature.id} key={feature.id} className="container mx-auto">
- <div className="mx-auto px-6 py-6 sm:py-20">
- <div className="mx-auto grid max-w-2xl grid-cols-1 gap-x-16 gap-y-16 sm:gap-y-20 lg:mx-0 lg:max-w-none lg:grid-cols-5">
- <div
- className={cn("m-auto lg:col-span-2", {
- "lg:order-last": feature.reverse,
- })}
- >
- <h2 className="text-base font-semibold leading-7 text-orange-600">
- {feature.header}
- </h2>
- <p className="mt-2 text-3xl font-bold tracking-tight text-gray-900 dark:text-gray-100 sm:text-4xl">
- {feature.name}
- </p>
- <p className="mt-6 text-lg leading-8 text-gray-600 dark:text-gray-400">
- {feature.description}
- </p>
- <Link
- className={cn(
- buttonVariants({
- variant: "default",
- size: "lg",
- }),
- "mt-8",
- )}
- href={feature.href}
- >
- {feature.cta}
- </Link>
- </div>
- <video
- src={feature.video}
- autoPlay
- loop
- muted
- className="m-auto rounded-xl border shadow-2xl lg:col-span-3"
- />
- </div>
- </div>
- </section>
- ))}
- </>
- );
-};
-
-export default FeatureSections;
diff --git a/components/landing/hero-client.tsx b/components/landing/hero-client.tsx
index 43459d43..5cfb8788 100644
--- a/components/landing/hero-client.tsx
+++ b/components/landing/hero-client.tsx
@@ -1,18 +1,11 @@
"use client";
import { Doc } from "@/.contentlayer/generated";
-import BuyButton from "@/components/landing/buy-button";
import TechStack from "@/components/tech-stack";
import { buttonVariants } from "@/components/ui/button";
import { Separator } from "@/components/ui/separator";
import { cn } from "@/lib/utils";
import AnimatedBeamMultipleInputDemo from "@/registry/components/example/animated-beam-multiple-inputs";
-import FeatureCard1 from "@/registry/components/example/animated-feature-card-1";
-import FeatureCard2 from "@/registry/components/example/animated-feature-card-2";
-import FeatureCard3 from "@/registry/components/example/animated-feature-card-3";
-import FeatureCard4 from "@/registry/components/example/animated-feature-card-4";
-import FeatureCard6 from "@/registry/components/example/animated-feature-card-6";
-import FeatureCard7 from "@/registry/components/example/animated-feature-card-7";
import AnimatedListDemo from "@/registry/components/example/animated-list-demo";
import BentoDemo from "@/registry/components/example/bento-demo";
import DockDemo from "@/registry/components/example/dock-demo";
@@ -20,20 +13,12 @@ import GlobeDemo from "@/registry/components/example/globe-demo";
import OrbitingCirclesDemo from "@/registry/components/example/orbiting-circles-demo";
import RetroGridDemo from "@/registry/components/example/retro-grid-demo";
import AnimatedGradientText from "@/registry/components/magicui/animated-gradient-text";
-import NumberTicker from "@/registry/components/magicui/number-ticker";
-import { StarFilledIcon } from "@radix-ui/react-icons";
import { motion, useInView } from "framer-motion";
import { ChevronRight } from "lucide-react";
import Link from "next/link";
import { useRef } from "react";
-export default function HeroClient({
- payments,
- post,
-}: {
- payments: number;
- post: Doc;
-}) {
+export default function HeroClient({ post }: { post: Doc }) {
const fadeInRef = useRef(null);
const fadeInInView = useInView(fadeInRef, {
once: true,
@@ -89,21 +74,7 @@ export default function HeroClient({
</AnimatedGradientText>
</Link>
</motion.div>
- {/* <motion.h1
- ref={fadeInRef}
- className="text-balance bg-gradient-to-br from-black from-30% to-black/60 bg-clip-text py-6 text-5xl font-medium leading-none tracking-tighter text-transparent dark:from-white dark:to-white/40 sm:text-6xl md:text-7xl lg:text-8xl"
- animate={fadeInInView ? "animate" : "initial"}
- variants={fadeUpVariants}
- initial={false}
- transition={{
- duration: 0.6,
- delay: 0.1,
- ease: [0.21, 0.47, 0.32, 0.98],
- type: "spring",
- }}
- >
- Create Magical <br /> Landing Pages <br />
- </motion.h1> */}
+
<motion.h1
animate={fadeInInView ? "animate" : "initial"}
variants={fadeUpVariants}
@@ -133,13 +104,12 @@ export default function HeroClient({
type: "spring",
}}
>
- 50+ open-source animated components built with{" "}
+ 20+ free and open-source animated components built with{" "}
<strong>React</strong>, <strong>Typescript</strong>,{" "}
<strong>Tailwind CSS</strong>, and{" "}
<strong>Framer Motion</strong>.
<br />
- Save thousands of hours, create a beautiful landing page, and
- convert your visitors into customers.
+ 100% open-source, and customizable.
</motion.p>
<motion.div
@@ -169,24 +139,24 @@ export default function HeroClient({
Browse Components
<ChevronRight className="ml-1 size-4 transition-all duration-300 ease-out group-hover:translate-x-1" />
</Link>
- <BuyButton />
+ <Link
+ href="/docs"
+ className={cn(
+ buttonVariants({
+ size: "lg",
+ variant: "ghost",
+ }),
+ "gap-2 whitespace-pre md:flex",
+ "group relative w-full gap-1 overflow-hidden rounded-full text-sm font-semibold tracking-tighter",
+ )}
+ >
+ Get Started
+ <ChevronRight className="ml-1 size-4 transition-all duration-300 ease-out group-hover:translate-x-1" />
+ </Link>
</div>
</motion.div>
- {/* <div className="inline-flex items-center justify-center gap-2">
- <Gift className="h-4 w-4 animate-bounce" />
- <span>
- <strong>
- $40 off for the first {Math.ceil(payments / 100) * 100}
- </strong>{" "}
- customers (
- {payments > 0
- ? Math.ceil(payments / 100) * 100 - payments
- : 0}{" "}
- left)
- </span>
- </div> */}
- <motion.div
+ {/* <motion.div
animate={fadeInInView ? "animate" : "initial"}
variants={fadeUpVariants}
initial={false}
@@ -233,15 +203,15 @@ export default function HeroClient({
<span className="inline-block text-center text-xs font-medium leading-snug tracking-tighter">
<NumberTicker
- value={payments}
+ value={500}
className="font-extrabold"
delay={0.2}
- />{" "}
- developers making beautiful landing pages
+ />
+ + developers making beautiful landing pages
</span>
</div>
</div>
- </motion.div>
+ </motion.div> */}
</div>
</div>
@@ -323,57 +293,8 @@ export default function HeroClient({
<GlobeDemo />
<OrbitingCirclesDemo />
<DockDemo />
- <FeatureCard1 />
- <FeatureCard2 />
- <FeatureCard7 />
- <FeatureCard3 />
- <FeatureCard4 />
- {/* <FeatureCard5 /> */}
- <FeatureCard6 />
</div>
</div>
-
- {/* <motion.div
- animate={fadeInInView ? "animate" : "initial"}
- variants={fadeUpVariants}
- initial={false}
- transition={{
- duration: 1.4,
- delay: 0.4,
- ease: [0.21, 0.47, 0.32, 0.98],
- type: "spring",
- }}
- className="relative mx-auto mt-24 h-full w-full max-w-[1200px] rounded-xl after:absolute after:inset-0 after:z-10 after:[background:linear-gradient(to_top,#fff_30%,transparent)] dark:after:[background:linear-gradient(to_top,#000000_10%,transparent)]"
- >
- <div
- className={cn(
- "absolute inset-0 bottom-1/2 h-full w-full transform-gpu [filter:blur(120px)]",
-
- // light styles
- "[background-image:linear-gradient(to_bottom,rgba(255,189,122,0.2),transparent_30%)]",
-
- // dark styles
- "dark:[background-image:linear-gradient(to_bottom,rgba(120,119,198,0.5),transparent_30%)]",
- )}
- />
-
- <img
- src="/dashboard-light.png"
- className="relative block h-full w-full rounded-xl border dark:hidden"
- />
- <img
- src="/dashboard-dark.png"
- className="relative hidden h-full w-full rounded-xl border dark:block"
- />
- <video
- autoPlay
- loop
- muted
- src="demo.mp4"
- className="h-auto w-full"
- />
- <BorderBeam size={150} />
- </motion.div> */}
</div>
</div>
</section>
diff --git a/components/landing/hero.tsx b/components/landing/hero.tsx
index a932f4b6..b37b4006 100644
--- a/components/landing/hero.tsx
+++ b/components/landing/hero.tsx
@@ -1,15 +1,8 @@
import { allDocs } from "@/.contentlayer/generated";
import HeroClient from "@/components/landing/hero-client";
-import { db } from "@/lib/db";
import { compareDesc } from "date-fns";
export default async function Hero() {
- const payments = await db.payment.count({
- where: {
- status: "succeeded",
- },
- });
-
const post = allDocs
.filter(
(post) =>
@@ -22,5 +15,5 @@ export default async function Hero() {
return compareDesc(new Date(a.date), new Date(b.date)); // Both dates are defined, proceed with comparison
})[0];
- return <HeroClient payments={payments} post={post} />;
+ return <HeroClient post={post} />;
}
diff --git a/components/landing/what-is-magic-ui.tsx b/components/landing/what-is-magic-ui.tsx
deleted file mode 100644
index 5cf0312a..00000000
--- a/components/landing/what-is-magic-ui.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-export default function WhatIsMagicUI() {
- return (
- <section id="what-is-magicui">
- <div className="container mx-auto max-w-2xl py-14">
- <h2 className="mb-4 text-center text-5xl font-bold tracking-tight text-foreground">
- What is Magic UI?
- </h2>
- <h3 className="mb-8 text-center text-lg font-medium tracking-tight text-foreground/80"></h3>
- </div>
- </section>
- );
-}
diff --git a/components/mdx-components.tsx b/components/mdx-components.tsx
index 574e4951..a3711026 100644
--- a/components/mdx-components.tsx
+++ b/components/mdx-components.tsx
@@ -1,8 +1,4 @@
-import { BlockPreview } from "@/components/block-preview";
-import CommitList from "@/components/commit-list";
-import RepoDownload from "@/components/repo-download";
import TechStack from "@/components/tech-stack";
-import TemplatePreview from "@/components/template-preview";
import {
Accordion,
AccordionContent,
@@ -43,9 +39,6 @@ const components = {
AccordionItem,
AccordionTrigger,
TechStack,
- CommitList,
- RepoDownload,
- TemplatePreview,
h1: ({ className, ...props }: React.HTMLAttributes<HTMLHeadingElement>) => (
<h1
className={cn(
@@ -111,7 +104,6 @@ const components = {
<TweetCard id={id} className="not-prose mx-auto" />
),
ComponentPreview,
- BlockPreview,
ComponentSource: (props: any) => <ComponentSource {...props} />,
p: ({ className, ...props }: React.HTMLAttributes<HTMLParagraphElement>) => (
<p
@@ -240,14 +232,6 @@ export function Mdx({ code }: MDXProps) {
className={cn(
"max-w-[120ch]",
`leading-tighter prose prose-gray tracking-tighter dark:prose-invert`,
- // `md:prose-lg lg:prose-xl`,
-
- // no underline on links
- // `prose-a:no-underline`,
- // `prose-a:transition-colors prose-a:duration-200 prose-a:ease-out`,
- // `dark:prose-a:text-gray-200 prose-a:underline-offset-4 dark:hover:prose-a:text-gray-700 prose-a:font-semibold hover:prose-a:text-gray-400`,
- // `prose-pre:bg-gray-900 prose-pre:rounded-xl prose-pre:overflow-x-auto prose-pre:border prose-pre:px-0 `,
-
`prose-pre:mb-4 prose-pre:mt-6 prose-pre:max-h-[650px] prose-pre:overflow-x-auto prose-pre:rounded-lg prose-pre:border prose-pre:px-0 prose-pre:py-4 prose-pre:text-xs prose-pre:tracking-tighter md:prose-pre:text-sm`,
)}
>
diff --git a/components/mobile-nav.tsx b/components/mobile-nav.tsx
index 1db6606f..d5cea19d 100644
--- a/components/mobile-nav.tsx
+++ b/components/mobile-nav.tsx
@@ -1,10 +1,5 @@
"use client";
-import { SidebarOpen } from "lucide-react";
-import Link, { LinkProps } from "next/link";
-import { useRouter } from "next/navigation";
-import * as React from "react";
-
import { Icons } from "@/components/icons";
import { Button } from "@/components/ui/button";
import { ScrollArea } from "@/components/ui/scroll-area";
@@ -12,6 +7,10 @@ import { Sheet, SheetContent, SheetTrigger } from "@/components/ui/sheet";
import { docsConfig } from "@/config/docs";
import { siteConfig } from "@/config/site";
import { cn } from "@/lib/utils";
+import { SidebarOpen } from "lucide-react";
+import Link, { LinkProps } from "next/link";
+import { useRouter } from "next/navigation";
+import * as React from "react";
export function MobileNav() {
const [open, setOpen] = React.useState(false);
diff --git a/components/preorder.tsx b/components/preorder.tsx
deleted file mode 100644
index da5fec24..00000000
--- a/components/preorder.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-"use client";
-
-import { PriceCard } from "@/components/price-card";
-import { plans } from "@/config/pricing";
-import { env } from "@/env.mjs";
-import { MagicContainer } from "@/registry/components/magicui/magic-card";
-import { useSession } from "next-auth/react";
-
-export default function PreOrder() {
- const { data: session, status } = useSession();
- const user = session?.user;
-
- const url = new URL(env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK);
-
- if (status === "authenticated" && user && user.email) {
- url.searchParams.append("prefilled_email", user.email);
- }
-
- return (
- <MagicContainer className="not-prose mt-8 grid w-full max-w-screen-md justify-center gap-8 lg:grid-cols-2">
- {plans.map((item, idx) => (
- <PriceCard key={idx} item={item} className="h-fit" />
- ))}
- </MagicContainer>
- );
-}
diff --git a/components/price-card.tsx b/components/price-card.tsx
deleted file mode 100644
index e9f464cd..00000000
--- a/components/price-card.tsx
+++ /dev/null
@@ -1,121 +0,0 @@
-"use client";
-
-import { Icons } from "@/components/icons";
-import { buttonVariants } from "@/components/ui/button";
-import { cn, hasApplePay } from "@/lib/utils";
-import FadeIn from "@/registry/components/magicui/fade-in";
-import { MagicCard } from "@/registry/components/magicui/magic-card";
-import { ArrowRightIcon, CheckIcon } from "@radix-ui/react-icons";
-import Link from "next/link";
-
-export const PriceCard = ({
- item,
- className,
-}: {
- item: any;
- className?: string;
-}) => {
- return (
- <FadeIn delay={0.3} className={cn("relative", className)}>
- <MagicCard
- spotlight={false}
- className="relative flex flex-col gap-8 overflow-hidden bg-[radial-gradient(var(--mask-size)_circle_at_var(--mouse-x)_var(--mouse-y),#ffaa40_0,#9c40ff_50%,transparent_100%)] p-8 text-black dark:text-white"
- >
- {item.banner && (
- <div className="absolute right-10 top-10 z-10 w-full translate-x-1/2 rotate-45 rounded-md bg-green-600 text-center font-bold">
- {item.banner}
- </div>
- )}
- <div className="z-10 flex h-full w-full flex-col gap-4">
- <div className="flex items-center">
- <div>{item.Icon}</div>
- <div className="ml-4">
- <h2 className="text-base font-semibold leading-7">{item.name}</h2>
- <p className="text-sm leading-5 text-foreground/70">{item.sub}</p>
- </div>
- </div>
-
- <div className="flex flex-row gap-2">
- <span className="text-7xl font-bold text-foreground">
- ${item.discountPrice}
- </span>
- {item.isDiscounted && (
- <span className="text-4xl font-bold text-gray-500 line-through dark:text-gray-500">
- ${item.price}
- </span>
- )}
- </div>
- {/* <span className="text-xl font-semibold text-foreground/20">
- one-time payment
- </span> */}
-
- <p className="text-sm font-normal tracking-tight text-foreground">
- {item.desc}
- </p>
- <Link
- href={item.href}
- target="_blank"
- className={cn(
- buttonVariants({ variant: "default", size: "lg" }),
- "group relative w-full gap-1 overflow-hidden rounded-sm text-lg font-semibold tracking-tighter",
- "transform-gpu rounded-sm ring-offset-current transition-all duration-300 ease-out hover:ring-2 hover:ring-primary hover:ring-offset-2",
- )}
- >
- <span className="absolute right-0 -mt-12 h-32 w-8 translate-x-12 rotate-12 transform-gpu bg-white opacity-10 transition-all duration-1000 ease-out group-hover:-translate-x-96 dark:bg-black" />
- {hasApplePay() && <Icons.apple className="ml-2 h-5 w-5" />}
- {hasApplePay() && <p>Pay</p>}
- {!hasApplePay() && <p>Get Lifetime Access</p>}
- {!hasApplePay() && (
- <ArrowRightIcon className="h-4 w-4 transition-all duration-300 ease-out group-hover:translate-x-1" />
- )}
- </Link>
-
- <hr className="m-0 h-px w-full border-none bg-gradient-to-r from-neutral-200/0 via-neutral-200/30 to-neutral-200/0" />
- {item.features.length > 0 && (
- <div>
- <p className="pb-2 font-medium text-foreground">
- {item.featureHeader}
- </p>
- <ul className="flex flex-col gap-2 font-normal">
- {item.features.map((featureItem: any, idx: any) => (
- <li
- key={idx}
- className="flex items-center gap-3 text-sm font-semibold text-foreground"
- >
- <CheckIcon className="h-5 w-5 text-green-400" />
- {featureItem}
- </li>
- ))}
- </ul>
- </div>
- )}
- </div>
-
- {/* <Link
- className="text-center text-xs"
- href="mailto:[email protected]?subject=Need%20a%20discount"
- >
- Can't afford it? Are you a student? <br /> Need a geographic discount?
- Please ask us <span className="underline">here.</span>
- </Link> */}
-
- {/* <Meteors /> */}
- {/* <div className="absolute inset-[1px] rounded-2xl bg-[radial-gradient(164.75%_100%_at_50%_0%,#334155_0%,#0F172A_48.73%)]" /> */}
-
- {/* <DotPattern
- width={20}
- height={20}
- x={-10}
- y={-10}
- cx={1}
- cy={1}
- cr={1}
- className={cn(
- "absolute inset-0 h-full w-full fill-black/[0.2] dark:fill-white/[0.2]",
- "[mask-image:linear-gradient(to_top_left,white,transparent,transparent)]",
- )}
- /> */}
- </MagicCard>
- </FadeIn>
- );
-};
diff --git a/components/pricing/faq.tsx b/components/pricing/faq.tsx
deleted file mode 100644
index f5b16236..00000000
--- a/components/pricing/faq.tsx
+++ /dev/null
@@ -1,128 +0,0 @@
-"use client";
-
-import {
- Accordion,
- AccordionContent,
- AccordionItem,
- AccordionTrigger,
-} from "@/components/ui/accordion";
-
-const faqs = [
- {
- section: "General",
- qa: [
- {
- question: 'What does "lifetime access" mean?',
- answer: (
- <span>
- It means you get access to all current and future components and
- templates for a{" "}
- <strong>
- one-time payment. No recurring fees. No subscription.
- </strong>
- </span>
- ),
- },
- {
- question: 'What does "lifetime updates" mean?',
- answer: (
- <span>
- It means you get access to all current components and templates,
- plus any new ones we add in the future at{" "}
- <strong>no additional cost.</strong>
- </span>
- ),
- },
- {
- question: "How do I get access once I've paid?",
- answer: (
- <span>
- Once you purchase through stripe, use the same email to login to the
- website{" "}
- <a href="https://magicui.design/login" className="underline">
- here
- </a>{" "}
- and you will have access to all components and templates. Components
- have to be copy + pasted into your project individually.
- </span>
- ),
- },
- {
- question: "Do you offer refunds?",
- answer: (
- <span>
- Due to the nature of digital products, we do not offer refunds. If
- you have any questions, please contact us at{" "}
- <a href="mailto:[email protected]" className="underline">
- </a>
- </span>
- ),
- },
- ],
- },
- {
- section: "Support",
- qa: [
- {
- question: "Do you offer technical support?",
- answer: (
- <span>
- Magic UI is a <strong>self-serve</strong> product. We do not offer
- technical support. However, if you have a bug to report, please open
- an issue{" "}
- <a href="https://magicui.featurebase.app/" className="underline">
- here
- </a>{" "}
- and we will fix it as soon as possible.
- </span>
- ),
- },
- ],
- },
-];
-
-export default function FAQ() {
- return (
- <section id="faqs" className="container py-14">
- <h2 className="mb-4 text-center text-5xl font-bold tracking-tight text-foreground">
- Frequently Asked Questions
- </h2>
- <h3 className="mb-8 text-center text-lg font-medium tracking-tight text-foreground/80">
- Need help with something? Here are some of the most common questions we
- get.
- </h3>
- <div className="container mx-auto my-12 max-w-[600px] space-y-12">
- {faqs.map((faq, idx) => (
- <section key={idx} id={"faq-" + faq.section}>
- <h2 className="mb-4 text-left text-base font-semibold tracking-tight text-foreground/60">
- {faq.section}
- </h2>
- <Accordion
- type="single"
- collapsible
- className="flex w-full flex-col items-center justify-center"
- >
- {faq.qa.map((faq, idx2) => (
- <AccordionItem
- key={idx2}
- value={faq.question}
- className="w-full max-w-[600px]"
- >
- <AccordionTrigger>{faq.question}</AccordionTrigger>
- <AccordionContent>{faq.answer}</AccordionContent>
- </AccordionItem>
- ))}
- </Accordion>
- </section>
- ))}
- </div>
- <h3 className="mb-12 text-center text-sm font-medium tracking-tight text-foreground/80">
- Still have questions? Email us at{" "}
- <a href="mailto:[email protected]" className="underline">
- </a>
- </h3>
- </section>
- );
-}
diff --git a/components/pricing/pricing.tsx b/components/pricing/pricing.tsx
deleted file mode 100644
index 90ee3838..00000000
--- a/components/pricing/pricing.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-import { PriceCard } from "@/components/price-card";
-import { plans } from "@/config/pricing";
-import { db } from "@/lib/db";
-import FadeIn from "@/registry/components/magicui/fade-in";
-import { MagicContainer } from "@/registry/components/magicui/magic-card";
-import { Gift } from "lucide-react";
-
-export default async function Hero() {
- const payments = await db.payment.count({
- where: {
- status: "succeeded",
- },
- });
-
- return (
- <section id="pricing" className="py-14">
- <div className="mx-auto max-w-screen-xl px-4 md:px-8">
- <div className="mx-auto max-w-2xl text-center">
- <FadeIn>
- <h4 className="text-xl font-bold tracking-tight text-foreground">
- Magic UI PRO
- </h4>
- </FadeIn>
- <FadeIn delay={0.1}>
- <h2 className="text-5xl font-bold tracking-tight text-foreground sm:text-7xl">
- Lifetime Access
- </h2>
- </FadeIn>
- <FadeIn delay={0.2}>
- <p className="mt-6 text-xl leading-8 text-foreground/80">
- Get <strong>lifetime access</strong> to all components and
- templates available today, plus any new ones we add in the future
- for a simple one-time price.
- </p>
- </FadeIn>
- </div>
-
- <FadeIn delay={0.3}>
- <div className="mx-auto my-8 flex w-full flex-col items-center justify-center gap-2">
- <span className="inline-flex items-center justify-center gap-2">
- <Gift className="h-4 w-4 animate-bounce" />{" "}
- <strong>$80 off for the next</strong>{" "}
- {payments > 0
- ? Math.ceil((payments + 1) / 100) * 100 - payments
- : 0}{" "}
- customers
- </span>
- <span className="rounded-lg border bg-green-600 p-2 text-white">
- ✨ Use code <strong>SPRINGSALE</strong> at checkout ✨
- </span>
- </div>
- </FadeIn>
-
- <MagicContainer className="mx-auto grid w-full max-w-screen-md justify-center gap-8 lg:grid-cols-1">
- {plans.map((item, idx) => (
- <PriceCard
- key={idx}
- item={item}
- className="mx-auto h-fit max-w-[400px]"
- />
- ))}
- </MagicContainer>
- </div>
- </section>
- );
-}
diff --git a/components/pricing/testimonials.tsx b/components/pricing/testimonials.tsx
deleted file mode 100644
index 8659ea77..00000000
--- a/components/pricing/testimonials.tsx
+++ /dev/null
@@ -1,73 +0,0 @@
-import FadeIn from "@/registry/components/magicui/fade-in";
-import Marquee from "@/registry/components/magicui/marquee";
-import TweetCard from "@/registry/components/magicui/tweet-card";
-
-const tweets = [
- "https://x.com/pkp_io/status/1684561895481802753",
- "https://x.com/devcagatay/status/1684573935466328065",
- "https://x.com/KanishkKhurana_/status/1684613797984800768",
- "https://x.com/WhopIO/status/1722690049374830639",
- "https://x.com/steventey/status/1722659583464968612",
- "https://x.com/AwesomAmri/status/1668432554842619906",
- "https://x.com/taishik_/status/1668510585926066176",
- "https://x.com/SullyOmarr/status/1668506160620769280",
- "https://x.com/sup_nim/status/1668525144409624578",
- "https://x.com/JakeDuth/status/1668442365625790465",
- "https://x.com/0xRaduan/status/1668557577985179648",
- "https://x.com/yazinsai/status/1668617800934641672",
-
- "https://x.com/wes_walke/status/1668612106696941570",
- "https://x.com/DevAlien/status/1668618017528479745",
- "https://x.com/fredmaiaarantes/status/1684676668445622272",
- "https://x.com/DesignSumu/status/1668559314272022528",
- "https://x.com/commandodev/status/1668640878225764354",
- "https://x.com/SandBoxSo/status/1668570645741948930",
- "https://x.com/sxndrao/status/1668634137547399168",
- "https://x.com/jordienr/status/1681389309037772820",
- "https://x.com/beneverman/status/1681477151042797568",
-].map((t) => t.split("/").slice(-1)[0]);
-
-export default async function Testimonials() {
- const firstRow = tweets.slice(0, tweets.length / 2);
- const secondRow = tweets.slice(tweets.length / 2);
-
- return (
- <section id="testimonials" className="container py-14">
- <h2 className="mb-4 text-center text-5xl font-bold tracking-tight text-foreground">
- What People Are Saying
- </h2>
- <h4 className="mb-8 text-center text-lg font-medium tracking-tight text-foreground/80">
- Don't just take our word for it. Here's what{" "}
- <strong>real people</strong> are saying about Magic UI on Twitter.
- </h4>
- <div className="relative flex flex-col">
- <Marquee className="max-w-screen [--duration:120s]" pauseOnHover>
- {firstRow.map((id, idx) => (
- <FadeIn delay={0.06 + idx * 0.04} key={idx}>
- <TweetCard
- id={id}
- className="max-h-32 w-72 min-w-[18rem] bg-background/60"
- />
- </FadeIn>
- ))}
- </Marquee>
- <Marquee
- className="max-w-screen [--duration:120s]"
- reverse
- pauseOnHover
- >
- {secondRow.map((id, idx) => (
- <FadeIn delay={0.06 + 0.04 * (secondRow.length - idx)} key={idx}>
- <TweetCard
- id={id}
- className="max-h-32 w-72 min-w-[18rem] bg-background/60"
- />
- </FadeIn>
- ))}
- </Marquee>
- <div className="pointer-events-none absolute inset-y-0 left-0 h-full w-1/5 bg-gradient-to-r from-white dark:from-background"></div>
- <div className="pointer-events-none absolute inset-y-0 right-0 h-full w-1/5 bg-gradient-to-l from-white dark:from-background"></div>
- </div>
- </section>
- );
-}
diff --git a/components/repo-download.tsx b/components/repo-download.tsx
deleted file mode 100644
index d02ee9e5..00000000
--- a/components/repo-download.tsx
+++ /dev/null
@@ -1,93 +0,0 @@
-"use client";
-
-import { Icons } from "@/components/icons";
-import { Button, buttonVariants } from "@/components/ui/button";
-import { cn, fetcher } from "@/lib/utils";
-import { ArrowRightIcon, Download } from "lucide-react";
-import { useSession } from "next-auth/react";
-import Link from "next/link";
-import { useEffect, useState } from "react";
-import { toast } from "sonner";
-import useSWR from "swr";
-
-export default function RepoDownload({
- repo,
- owner,
-}: {
- repo: string;
- owner: string;
-}) {
- const [loading, setLoading] = useState(false);
- const { data: session, status } = useSession();
- const [paywall, setPaywall] = useState(true);
- const { data, isLoading } = useSWR(
- status === "authenticated" && "/api/me",
- fetcher,
- );
-
- useEffect(() => {
- const shouldShowPaywall =
- status === "unauthenticated" ||
- (data?.user?.customer?.payments?.length === 0 &&
- data?.user?.role !== "ADMIN");
- setPaywall(shouldShowPaywall);
- }, [status, data]);
-
- const handleDownload = async () => {
- setLoading(true);
-
- try {
- const response = await fetch(
- `${process.env.NEXT_PUBLIC_APP_URL}/api/repo/download`,
- {
- method: "POST",
- headers: {
- "Content-Type": "application/json",
- },
- body: JSON.stringify({ repo, owner }),
- },
- );
- if (!response.ok) {
- throw new Error(`HTTP error! status: ${response.status}`);
- }
- const data = await response.json();
- const downloadUrl = data.downloadUrl;
- /* window.open(downloadUrl, "_blank"); */
- window.location.href = downloadUrl;
- } catch (error) {
- toast.error("Error occured while downloading. Please try again.");
- console.error("error", error);
- } finally {
- setLoading(false);
- }
- };
-
- return (
- <>
- {paywall ? (
- <Link
- href="/pricing"
- className={cn(
- buttonVariants({
- variant: "default",
- }),
- "not-prose group relative w-full gap-1",
- )}
- >
- Buy Now
- <ArrowRightIcon className="h-4 w-4 transition-all duration-300 ease-out group-hover:translate-x-1" />
- </Link>
- ) : (
- <Button
- onClick={handleDownload}
- disabled={loading}
- className="not-prose group relative w-full gap-2"
- >
- {loading ? "Downloading" : "Download"}
- {!loading && <Download className="h-4 w-4" />}
- {loading && <Icons.spinner className="h-4 w-4 animate-spin" />}
- </Button>
- )}
- </>
- );
-}
diff --git a/components/site-banner.tsx b/components/site-banner.tsx
index 60bfd200..dabce3c4 100644
--- a/components/site-banner.tsx
+++ b/components/site-banner.tsx
@@ -1,49 +1,23 @@
+import { ChevronRight } from "lucide-react";
import Link from "next/link";
export function SiteBanner() {
return (
- <div className="relative top-0 bg-background py-3 md:py-0">
+ <div className="relative top-0 bg-indigo-600 py-3 text-white md:py-0">
<div className="container flex flex-col items-center justify-center gap-4 md:h-12 md:flex-row">
<Link
- href="https://discord.gg/X4BBMBjHNf"
+ href="https://pro.magicui.design"
target="_blank"
- className="text-center text-sm leading-loose text-muted-foreground"
+ className="group inline-flex items-center justify-center text-center text-sm leading-loose"
>
✨
- <span className="font-bold text-black dark:text-white">
+ <span className="font-bold">
{" "}
- Join our new discord community <strong>here</strong>
+ Introducing Magic UI Pro - 50+ blocks and templates to build
+ beautiful landing pages in minutes.
</span>{" "}
- ✨
- {/* Get{" "}
- <span className="font-bold text-black dark:text-white">
- $30 off
- </span>{" "}
- with code{" "}
- <span className="rounded-md bg-orange-400 p-1 font-bold text-black dark:text-white">
- BLOCKPARTY
- </span>{" "}
- ✨ */}
+ <ChevronRight className="ml-1 size-4 transition-all duration-300 ease-out group-hover:translate-x-1" />
</Link>
- {/* <Link
- href="/pricing"
- className="text-center text-sm leading-loose text-muted-foreground"
- >
- ✨
- <span className="font-bold text-black dark:text-white">
- {" "}
- New Page Sections Launch Sale -{" "}
- </span>{" "}
- Get{" "}
- <span className="font-bold text-black dark:text-white">
- $30 off
- </span>{" "}
- with code{" "}
- <span className="rounded-md bg-orange-400 p-1 font-bold text-black dark:text-white">
- BLOCKPARTY
- </span>{" "}
- ✨
- </Link> */}
</div>
<hr className="absolute bottom-0 m-0 h-px w-full bg-neutral-200/30" />
</div>
diff --git a/components/site-header.tsx b/components/site-header.tsx
index b657ffa0..52e8b7fc 100644
--- a/components/site-header.tsx
+++ b/components/site-header.tsx
@@ -2,11 +2,8 @@ import { CommandMenu } from "@/components/command-menu";
import { MainNav } from "@/components/main-nav";
import { MobileNav } from "@/components/mobile-nav";
import { ModeToggle } from "@/components/mode-toggle";
-import { buttonVariants } from "@/components/ui/button";
-import { UserAccountNav } from "@/components/user-account-nav";
import { cn } from "@/lib/utils";
import { User } from "next-auth";
-import Link from "next/link";
interface SiteHeaderProps {
user?: User;
@@ -17,7 +14,6 @@ export function SiteHeader({ user }: SiteHeaderProps) {
<header
className={cn(
"supports-backdrop-blur:bg-background/90 sticky top-0 z-40 w-full bg-background/40 backdrop-blur-lg",
- // "[background-size:8px_8px] dark:bg-[radial-gradient(transparent_1px,#09090B_1px)] bg-[radial-gradient(transparent_1px,white_1px)]",
)}
>
<div className="container flex h-16 items-center">
@@ -28,73 +24,7 @@ export function SiteHeader({ user }: SiteHeaderProps) {
<CommandMenu />
</div>
<nav className="flex items-center gap-2">
- {/* <Link href="/discord" target="_blank" rel="noreferrer">
- <div
- className={cn(
- buttonVariants({ variant: "ghost" }),
- "hover-[#5865F2] w-9 gap-2 px-0 text-[#5865F2]",
- )}
- >
- <DiscordLogoIcon className="h-4 w-4 fill-current" />
- <span className="sr-only">Discord</span>
- </div>
- </Link> */}
- {/* <Link
- href={siteConfig.links.twitter}
- target="_blank"
- rel="noreferrer"
- >
- <div
- className={cn(
- buttonVariants({
- variant: "ghost",
- }),
- "w-9 px-0",
- )}
- >
- <Icons.twitter className="h-4 w-4 fill-current" />
- <span className="sr-only">Twitter</span>
- </div>
- </Link> */}
<ModeToggle />
-
- {user && (
- <UserAccountNav
- user={{
- name: user.name,
- image: user.image,
- email: user.email,
- }}
- />
- )}
-
- {!user && (
- <>
- <Link
- href="/login"
- className={cn(
- buttonVariants({ variant: "secondary", size: "sm" }),
- "px-4",
- )}
- >
- Login
- </Link>
- {/* <Link
- className={cn(
- buttonVariants({
- size: "sm",
- }),
- "hidden gap-2 whitespace-pre md:flex",
- "group relative w-full gap-1 overflow-hidden rounded-sm text-sm font-semibold tracking-tighter",
- "transform-gpu rounded-sm ring-offset-current transition-all duration-300 ease-out hover:ring-2 hover:ring-primary hover:ring-offset-2",
- )}
- href={env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK}
- >
- <span className="absolute right-0 -mt-12 h-32 w-8 translate-x-12 rotate-12 transform bg-white opacity-10 transition-all duration-1000 ease-out group-hover:-translate-x-24 dark:bg-black" />
- Buy Now
- </Link> */}
- </>
- )}
</nav>
</div>
</div>
diff --git a/components/stripe-portal-button.tsx b/components/stripe-portal-button.tsx
deleted file mode 100644
index 645eeb37..00000000
--- a/components/stripe-portal-button.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-"use client";
-
-import { createBillingPortal } from "@/app/(dashboard)/dashboard/billing/create-billing-portal.action";
-import { Icons } from "@/components/icons";
-import { Button } from "@/components/ui/button";
-import { toast } from "@/components/ui/use-toast";
-import { useState } from "react";
-
-export const BillingPortalButton = ({
- children = "Manage Subscription",
-}: {
- children?: React.ReactNode;
-}) => {
- const [isLoading, setIsLoading] = useState(false);
-
- const handleFetchPortalUrl = async () => {
- if (isLoading) {
- return;
- }
-
- setIsLoading(true);
-
- try {
- const sessionUrl = await createBillingPortal();
-
- if (!sessionUrl) {
- throw new Error("NO_SESSION");
- }
-
- window.open(sessionUrl, "_blank");
- } catch (e: any) {
- let description =
- "We are unable to proceed to the billing portal at this time. Please try again, or contact support.";
-
- if (e.message === "CUSTOMER_NOT_FOUND") {
- description =
- "You do not currently have a customer record, this should not happen. Please contact support for assistance.";
- }
-
- toast({
- title: "Something went wrong",
- description,
- variant: "destructive",
- });
- }
-
- setIsLoading(false);
- };
-
- return (
- <Button
- onClick={async () => handleFetchPortalUrl()}
- disabled={isLoading}
- className="flex w-full max-w-[400px] gap-2"
- >
- {children}
- {isLoading && <Icons.spinner className="mr-2 h-4 w-4 animate-spin" />}
- </Button>
- );
-};
diff --git a/components/template-preview.tsx b/components/template-preview.tsx
deleted file mode 100644
index 7f8a0c73..00000000
--- a/components/template-preview.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import { buttonVariants } from "@/components/ui/button";
-import { cn } from "@/lib/utils";
-import { ExternalLinkIcon } from "@radix-ui/react-icons";
-import Link from "next/link";
-import { ReactNode } from "react";
-
-export default function TemplatePreview({
- href,
- children,
-}: {
- href: string;
- children: ReactNode;
-}) {
- return (
- <Link
- className={cn(
- buttonVariants({
- variant: "outline",
- }),
- "not-prose group relative w-full gap-2",
- )}
- href={href}
- target="_blank"
- >
- {children}
- <ExternalLinkIcon className="h-4 w-4" />
- </Link>
- );
-}
diff --git a/components/toc.tsx b/components/toc.tsx
index 87b0e9f9..7d1b53ce 100644
--- a/components/toc.tsx
+++ b/components/toc.tsx
@@ -1,7 +1,7 @@
"use client";
-import { useMounted } from "@/hooks/use-mounted";
import { TableOfContents } from "@/lib/toc";
+import { useMounted } from "@/lib/use-mounted";
import { cn } from "@/lib/utils";
import { useEffect, useMemo, useState } from "react";
diff --git a/components/user-account-nav.tsx b/components/user-account-nav.tsx
deleted file mode 100644
index e7b10221..00000000
--- a/components/user-account-nav.tsx
+++ /dev/null
@@ -1,61 +0,0 @@
-"use client";
-
-import {
- DropdownMenu,
- DropdownMenuContent,
- DropdownMenuItem,
- DropdownMenuSeparator,
- DropdownMenuTrigger,
-} from "@/components/ui/dropdown-menu";
-import { UserAvatar } from "@/components/user-avatar";
-import { dashboardConfig } from "@/config/dashboard";
-import { User } from "next-auth";
-import { signOut } from "next-auth/react";
-import Link from "next/link";
-
-interface UserAccountNavProps extends React.HTMLAttributes<HTMLDivElement> {
- user: Pick<User, "name" | "image" | "email">;
-}
-
-export function UserAccountNav({ user }: UserAccountNavProps) {
- return (
- <DropdownMenu>
- <DropdownMenuTrigger>
- <UserAvatar
- user={{ name: user.name || null, image: user.image || null }}
- className="h-8 w-8"
- />
- </DropdownMenuTrigger>
- <DropdownMenuContent align="end">
- <div className="flex items-center justify-start gap-2 p-2">
- <div className="flex flex-col space-y-1 leading-none">
- {user.name && <p className="font-medium">{user.name}</p>}
- {user.email && (
- <p className="w-[200px] truncate text-sm text-muted-foreground">
- {user.email}
- </p>
- )}
- </div>
- </div>
- <DropdownMenuSeparator />
- {dashboardConfig.sidebarNav.map((item) => (
- <DropdownMenuItem asChild key={item.title}>
- <Link href={item.href!}>{item.title}</Link>
- </DropdownMenuItem>
- ))}
- <DropdownMenuSeparator />
- <DropdownMenuItem
- className="cursor-pointer"
- onSelect={(event) => {
- event.preventDefault();
- signOut({
- callbackUrl: `${window.location.origin}/`,
- });
- }}
- >
- Sign out
- </DropdownMenuItem>
- </DropdownMenuContent>
- </DropdownMenu>
- );
-}
diff --git a/components/user-auth-form.tsx b/components/user-auth-form.tsx
deleted file mode 100644
index 547156df..00000000
--- a/components/user-auth-form.tsx
+++ /dev/null
@@ -1,138 +0,0 @@
-"use client";
-
-import { Icons } from "@/components/icons";
-import { buttonVariants } from "@/components/ui/button";
-import { Input } from "@/components/ui/input";
-import { cn } from "@/lib/utils";
-import { userAuthSchema } from "@/lib/validations/auth";
-import { zodResolver } from "@hookform/resolvers/zod";
-import { signIn } from "next-auth/react";
-import * as React from "react";
-import { useForm } from "react-hook-form";
-import { toast } from "sonner";
-import * as z from "zod";
-import { Form, FormControl, FormField, FormItem, FormMessage } from "./ui/form";
-
-interface UserAuthFormProps extends React.HTMLAttributes<HTMLDivElement> {}
-
-type FormData = z.infer<typeof userAuthSchema>;
-
-export function UserAuthForm({ className, ...props }: UserAuthFormProps) {
- const form = useForm<FormData>({
- resolver: zodResolver(userAuthSchema),
- defaultValues: {
- email: "",
- },
- });
- const [isLoading, setIsLoading] = React.useState<boolean>(false);
- const [isGitHubLoading, setIsGitHubLoading] = React.useState<boolean>(false);
-
- async function onSubmit(data: FormData) {
- setIsLoading(true);
-
- const signInResult = await signIn("email", {
- email: data.email.toLowerCase(),
- redirect: false,
- callbackUrl: "/",
- });
-
- setIsLoading(false);
-
- if (!signInResult?.ok) {
- return toast.error("Something went wrong.", {
- description: "Your sign in request failed. Please try again.",
- });
- }
-
- return toast.success("Check your email", {
- description: "We sent you a login link. Be sure to check your spam too.",
- });
- }
-
- return (
- <div className={cn("grid gap-6", className)} {...props}>
- <Form {...form}>
- <form onSubmit={form.handleSubmit(onSubmit)}>
- <div className="grid gap-4">
- <FormField
- control={form.control}
- name="email"
- render={({ field }) => (
- <FormItem>
- {/* <FormLabel>Email</FormLabel> */}
- <FormControl>
- <Input
- id="email"
- placeholder="[email protected]"
- type="email"
- autoCapitalize="none"
- autoComplete="email"
- autoCorrect="off"
- disabled={isLoading || isGitHubLoading}
- {...field}
- />
- </FormControl>
- {/* <FormDescription>This is your email address.</FormDescription> */}
- <FormMessage />
- </FormItem>
- )}
- />
-
- {/* <div className="grid gap-1">
- <Label className="sr-only" htmlFor="email">
- Email
- </Label>
- <Input
- id="email"
- placeholder="[email protected]"
- type="email"
- autoCapitalize="none"
- autoComplete="email"
- autoCorrect="off"
- disabled={isLoading || isGitHubLoading}
- {...form.register("email")}
- />
- {form.formState.errors?.email && (
- <p className="px-1 text-xs text-red-600">
- {form.formState.errors.email.message}
- </p>
- )}
- </div> */}
- <button className={cn(buttonVariants())} disabled={isLoading}>
- {isLoading && (
- <Icons.spinner className="mr-2 h-4 w-4 animate-spin" />
- )}
- Sign In with Email
- </button>
- </div>
- </form>
- </Form>
- {/* <div className="relative">
- <div className="absolute inset-0 flex items-center">
- <span className="w-full border-t" />
- </div>
- <div className="relative flex justify-center text-xs uppercase">
- <span className="bg-background px-2 text-muted-foreground">
- Or continue with
- </span>
- </div>
- </div>
- <button
- type="button"
- className={cn(buttonVariants({ variant: "outline" }))}
- onClick={() => {
- setIsGitHubLoading(true);
- signIn("github");
- }}
- disabled={isLoading || isGitHubLoading}
- >
- {isGitHubLoading ? (
- <Icons.spinner className="mr-2 h-4 w-4 animate-spin" />
- ) : (
- <Icons.gitHub className="mr-2 h-4 w-4" />
- )}{" "}
- Github
- </button> */}
- </div>
- );
-}
diff --git a/config/docs.ts b/config/docs.ts
index 84ae295d..3c15d43b 100644
--- a/config/docs.ts
+++ b/config/docs.ts
@@ -11,19 +11,11 @@ export const docsConfig: DocsConfig = {
title: "Components",
href: "/components",
},
- // {
- // title: "Blocks",
- // href: "/blocks",
- // },
- // {
- // title: "Pricing",
- // href: "/pricing",
- // },
- // {
- // title: "Submit Feedback",
- // href: "https://magicui.featurebase.app/",
- // external: true,
- // },
+ {
+ title: "Magic UI PRO",
+ href: "https://pro.magicui.design",
+ external: true,
+ },
{
title: "Roadmap",
href: "https://magicui.featurebase.app/roadmap",
@@ -49,102 +41,6 @@ export const docsConfig: DocsConfig = {
href: "/docs/installation",
items: [],
},
- // {
- // title: "Changelog",
- // href: "/docs/changelog",
- // items: [],
- // },
- // {
- // title: "Story",
- // href: "/docs/story",
- // items: [],
- // },
- ],
- },
- {
- title: "Templates (PRO)",
- items: [
- {
- title: "Startup",
- href: `/docs/templates/startup`,
- items: [],
- label: "New",
- },
- {
- title: "Portfolio",
- href: `/docs/templates/portfolio`,
- items: [],
- label: "New",
- },
- // {
- // title: "Dark",
- // href: `/docs/templates/dark`,
- // items: [],
- // label: "Coming soon",
- // },
- ],
- },
- {
- title: "Page Sections (PRO)",
- items: [
- {
- title: "Header",
- href: `/docs/sections/header`,
- items: [],
- },
- {
- title: "Hero",
- href: `/docs/sections/hero`,
- items: [],
- label: "",
- },
- {
- title: "Social Proof Press",
- href: `/docs/sections/social-proof-press`,
- items: [],
- },
- {
- title: "Social Proof Companies",
- href: `/docs/sections/social-proof-companies`,
- items: [],
- },
- {
- title: "Social Proof Testimonials",
- href: `/docs/sections/social-proof-testimonials`,
- items: [],
- },
- // {
- // title: "Features",
- // href: `/docs/sections/features`,
- // items: [],
- // },
- {
- title: "Feature Cards",
- href: `/docs/components/feature-cards`,
- items: [],
- label: "10+ New",
- },
- {
- title: "Call To Action",
- href: `/docs/sections/call-to-action`,
- items: [],
- },
-
- {
- title: "Pricing",
- href: `/docs/sections/pricing`,
- items: [],
- },
- {
- title: "FAQ",
- href: `/docs/sections/faq`,
- items: [],
- },
- {
- title: "Footer",
- href: `/docs/sections/footer`,
- items: [],
- },
],
},
{
@@ -189,7 +85,6 @@ export const docsConfig: DocsConfig = {
},
],
},
-
{
title: "Special Effects",
items: [
@@ -262,7 +157,6 @@ export const docsConfig: DocsConfig = {
},
],
},
-
{
title: "Backgrounds",
items: [
@@ -298,28 +192,5 @@ export const docsConfig: DocsConfig = {
},
],
},
-
- // {
- // title: "Components",
- // items: allDocs
- // .filter(
- // (post) =>
- // post.date &&
- // post.date <= new Date().toISOString() &&
- // post.published &&
- // post.slug.includes("components"),
- // )
- // .sort((a, b) => {
- // if (!a.date && !b.date) return 0; // Both dates are undefined, keep original order
- // if (!a.date) return 1; // Move a to the end if date is undefined
- // if (!b.date) return -1; // Move b to the end if date is undefined
- // return compareDesc(new Date(a.date), new Date(b.date)); // Both dates are defined, proceed with comparison
- // })
- // .map((component) => ({
- // title: component.title,
- // href: `/docs/${component.slugAsParams}`,
- // items: [],
- // })),
- // },
],
};
diff --git a/config/site.ts b/config/site.ts
index 5ee52c27..7228233a 100644
--- a/config/site.ts
+++ b/config/site.ts
@@ -5,7 +5,7 @@ export const siteConfig = {
description:
"Beautifully designed landing page components built with React & Tailwind CSS.",
links: {
- twitter: "https://twitter.com/dillionverma",
+ twitter: "https://twitter.com/magicuidesign",
discord: "https://discord.gg/87p2vpsat5",
},
keywords: [
diff --git a/content/docs/components/feature-cards.mdx b/content/docs/components/feature-cards.mdx
deleted file mode 100644
index 9257862e..00000000
--- a/content/docs/components/feature-cards.mdx
+++ /dev/null
@@ -1,28 +0,0 @@
----
-title: Animated Feature Cards
-date: 2023-04-08
-description: A collection of feature cards. Used to showcase features of your app on your landing page.
-author: dillionverma
-published: true
-video: https://cdn.magicui.design/animated-feature-cards.mp4
----
-
-<BlockPreview name="animated-feature-card-1" align="center" />
-
-<BlockPreview name="animated-feature-card-2" align="center" />
-
-<BlockPreview name="animated-feature-card-3" align="center" />
-
-<BlockPreview name="animated-feature-card-4" align="center" />
-
-<BlockPreview name="animated-feature-card-5" align="center" />
-
-<BlockPreview name="animated-feature-card-6" align="center" />
-
-<BlockPreview name="animated-feature-card-7" align="center" />
-
-<BlockPreview name="animated-feature-card-8" align="center" />
-
-<BlockPreview name="animated-feature-card-9" align="center" />
-
-<BlockPreview name="animated-feature-card-10" align="center" />
\ No newline at end of file
diff --git a/content/docs/sections/call-to-action.mdx b/content/docs/sections/call-to-action.mdx
deleted file mode 100644
index 2159bfd8..00000000
--- a/content/docs/sections/call-to-action.mdx
+++ /dev/null
@@ -1,14 +0,0 @@
----
-title: Call to Action (CTA) Section
-date: 2024-02-27
-description: These components are used to build the call to action of the website.
-author: dillionverma
-published: true
----
-
-Note: Some of the components here make use of the [shadcn](https://ui.shadcn.com) library such as `Button`.
-
-Please follow instructions there to get started. If you have any questions, join our [discord](https://discord.gg/X4BBMBjHNf).
-
-<BlockPreview name="call-to-action-1" />
-<BlockPreview name="call-to-action-2" />
diff --git a/content/docs/sections/faq.mdx b/content/docs/sections/faq.mdx
deleted file mode 100644
index fae98dc5..00000000
--- a/content/docs/sections/faq.mdx
+++ /dev/null
@@ -1,13 +0,0 @@
----
-title: FAQ Section
-date: 2024-03-20
-description: These components are used to build the faq section of the website.
-author: dillionverma
-published: true
----
-
-Note: Some of the components here make use of the [shadcn](https://ui.shadcn.com) library such as **Accordion**.
-
-Please follow instructions there to get started. If you have any questions, join our [discord](https://discord.gg/X4BBMBjHNf).
-
-<BlockPreview name="faq-1" />
diff --git a/content/docs/sections/features.mdx b/content/docs/sections/features.mdx
deleted file mode 100644
index 11ef5d40..00000000
--- a/content/docs/sections/features.mdx
+++ /dev/null
@@ -1,11 +0,0 @@
----
-title: Features Section
-date: 2024-02-27
-description: These components are used to build the features section of the website.
-author: dillionverma
-published: true
-# video: https://cdn.magicui.design/animated-beam.mp4
----
-
-
-<BlockPreview name="features-1"/>
\ No newline at end of file
diff --git a/content/docs/sections/footer.mdx b/content/docs/sections/footer.mdx
deleted file mode 100644
index 5e232e71..00000000
--- a/content/docs/sections/footer.mdx
+++ /dev/null
@@ -1,10 +0,0 @@
----
-title: Footer Section
-date: 2024-02-27
-description: These components are used to build the footer of the website.
-author: dillionverma
-published: true
----
-
-<BlockPreview name="footer-1" />
-{/* <BlockPreview name="footer-2" /> */}
diff --git a/content/docs/sections/header.mdx b/content/docs/sections/header.mdx
deleted file mode 100644
index e827d0c6..00000000
--- a/content/docs/sections/header.mdx
+++ /dev/null
@@ -1,12 +0,0 @@
----
-title: Header Section
-date: 2024-03-15
-description: These components are used to build the header of the website.
-author: dillionverma
-published: true
-# video: https://cdn.magicui.design/animated-beam.mp4
----
-
-## 🚧 Under construction 🚧
-
-<BlockPreview name="header-1" />
diff --git a/content/docs/sections/hero.mdx b/content/docs/sections/hero.mdx
deleted file mode 100644
index 4ddac53d..00000000
--- a/content/docs/sections/hero.mdx
+++ /dev/null
@@ -1,12 +0,0 @@
----
-title: Hero Section
-date: 2024-04-10
-description: These components are the first thing a user sees when they land on a page. They are used to grab the user's attention and provide a brief overview of the page's content.
-author: dillionverma
-published: true
-# video: https://cdn.magicui.design/animated-beam.mp4
----
-
-<BlockPreview name="hero-1" />
-
-<BlockPreview name="hero-2" />
diff --git a/content/docs/sections/pricing.mdx b/content/docs/sections/pricing.mdx
deleted file mode 100644
index 59a92413..00000000
--- a/content/docs/sections/pricing.mdx
+++ /dev/null
@@ -1,17 +0,0 @@
----
-title: Pricing Section
-date: 2024-03-15
-description: These components are used to build the pricing of the website.
-author: dillionverma
-published: true
-# video: https://cdn.magicui.design/animated-beam.mp4
----
-
-
-Note: Some of the components here make use of the [shadcn](https://ui.shadcn.com) library such as **Switch** and **Button**.
-
-Please follow instructions there to get started. If you have any questions, join our [discord](https://discord.gg/X4BBMBjHNf).
-
-<BlockPreview name="pricing-1" />
-
-{/* <BlockPreview name="pricing-2" /> */}
\ No newline at end of file
diff --git a/content/docs/sections/social-proof-companies.mdx b/content/docs/sections/social-proof-companies.mdx
deleted file mode 100644
index ccf107c8..00000000
--- a/content/docs/sections/social-proof-companies.mdx
+++ /dev/null
@@ -1,20 +0,0 @@
----
-title: Social Proof Section (Companies)
-date: 2024-03-11
-description: These components are used to build the social proof section of the website.
-author: dillionverma
-published: true
----
-
-<BlockPreview name="social-proof-companies-1" free />
-<BlockPreview name="social-proof-companies-2" free />
-<BlockPreview name="social-proof-companies-3" />
-<BlockPreview name="social-proof-companies-4" />
-
----
-
-## Disclaimer
-
-The company logos and trademarks shown on this website are the intellectual property of their respective owners. They are presented here solely for illustrative and educational purposes and do not signify any endorsement, sponsorship, or association with our product or services.
-
-We have taken care to ensure that the use of these logos and trademarks adheres to fair use standards and reflects the high regard we hold for these companies. However, if any company wishes to have their logo removed or has specific usage guidelines we have inadvertently not followed, please contact us at [[email protected]](mailto:[email protected]) directly for immediate action.
diff --git a/content/docs/sections/social-proof-press.mdx b/content/docs/sections/social-proof-press.mdx
deleted file mode 100644
index 828eeddf..00000000
--- a/content/docs/sections/social-proof-press.mdx
+++ /dev/null
@@ -1,18 +0,0 @@
----
-title: Social Proof Section (Press)
-date: 2024-03-11
-description: These components are used to showcase social proof of a website.
-author: dillionverma
-published: true
----
-
-<BlockPreview name="social-proof-press-1" free />
-<BlockPreview name="social-proof-press-2" free />
-<BlockPreview name="social-proof-press-3" />
-
-
-## Disclaimer
-
-The company logos and trademarks shown on this website are the intellectual property of their respective owners. They are presented here solely for illustrative and educational purposes and do not signify any endorsement, sponsorship, or association with our product or services.
-
-We have taken care to ensure that the use of these logos and trademarks adheres to fair use standards and reflects the high regard we hold for these companies. However, if any company wishes to have their logo removed or has specific usage guidelines we have inadvertently not followed, please contact us at [[email protected]](mailto:[email protected]) directly for immediate action.
diff --git a/content/docs/sections/social-proof-testimonials.mdx b/content/docs/sections/social-proof-testimonials.mdx
deleted file mode 100644
index b8b8c035..00000000
--- a/content/docs/sections/social-proof-testimonials.mdx
+++ /dev/null
@@ -1,17 +0,0 @@
----
-title: Social Proof Section (Testimonials)
-date: 2024-03-15
-description: These components are used to build the social proof section of the website.
-author: dillionverma
-published: true
----
-
-<BlockPreview name="social-proof-testimonials-1" />
-
-<BlockPreview name="social-proof-testimonials-2" />
-
-<BlockPreview name="social-proof-testimonials-3" />
-
-{/* <BlockPreview name="social-proof-testimonials-2" free />
-<BlockPreview name="social-proof-testimonials-3" />
-<BlockPreview name="social-proof-testimonials-4" /> */}
diff --git a/content/docs/story.mdx b/content/docs/story.mdx
index b3befe60..bea82137 100644
--- a/content/docs/story.mdx
+++ b/content/docs/story.mdx
@@ -6,7 +6,7 @@ published: false
Magic UI started because of an annoying problem I faced in the summer of 2023.
-I developed my [first SaaS app](https://automatic.chat) a few months earlier and was trying to redesign the landing page for it. However, none of the code I wrote matched my expectations in my head for how it would turn out. I was irritated by the process and I especially didn't like having to deal with responsiveness, and animations in particular. Both were really time consuming for me and I felt like I wasn't making progress on actually delivering value to my SaaS users.
+I built my [first SaaS app](https://automatic.chat) a few months earlier and was trying to redesign the landing page for it. However, none of the code I wrote matched my expectations in my head for how it would turn out. I was irritated by the process and I especially didn't like having to deal with responsiveness, and animations in particular. Both were really time consuming for me and I felt like I wasn't making progress on actually delivering value to my SaaS users.
I was trying to make landing pages like https://linear.app, https://wope.com and https://reflect.app but they were instead turning out like websites designed in 1995.
diff --git a/content/docs/templates/portfolio.mdx b/content/docs/templates/portfolio.mdx
deleted file mode 100644
index 6cbee334..00000000
--- a/content/docs/templates/portfolio.mdx
+++ /dev/null
@@ -1,45 +0,0 @@
----
-title: Portfolio Template
-date: 2024-05-08
-description: A minimal portfolio template to showcase your work and experience
-author: dillionverma
-published: true
----
-
-## 🚧 Under construction 🚧
-
-<div className="max-w-[800px]">
- <video
- autoPlay
- loop
- muted
- src="/portfolio-template-demo.mp4"
- className="w-full rounded-xl border shadow-2xl"
- />
- <div className="flex sm:flex-row gap-2 w-full flex-col">
- <RepoDownload repo={'portfolio-template'} owner={'dillionverma'} />
- <TemplatePreview href="https://portfolio-template-magicui.vercel.app/">Live Preview </TemplatePreview>
- </div>
-</div>
-
-### What is this?
-A complete template to market yourself and your portfolio to the world as a developer
-
-### Why should I use this?
-- ✅ Save 100+ hours of work
-- ✅ No need to learn advanced animations
-- ✅ Easy to configure and change
-- ✅ 1-click download and setup.
-- ✅ 5 minutes to update the text and images.
-- ✅ Deploy live to vercel
-
-### Features
-- Hero Section
-- Projects Section
-- Footer Section
-
-### Tech Stack
-<TechStack technologies={["nextjs", "react", "typescript", "tailwindcss", "framermotion", "shadcn" ]}/ >
-
-### Changelog
-<CommitList repo='portfolio-template' owner='dillionverma' />
diff --git a/content/docs/templates/startup.mdx b/content/docs/templates/startup.mdx
deleted file mode 100644
index 57b4821a..00000000
--- a/content/docs/templates/startup.mdx
+++ /dev/null
@@ -1,55 +0,0 @@
----
-title: Startup Template
-date: 2024-04-12
-description: The best landing page template for launching new ideas. Perfect for bootstrappers and pre-PMF VC backed startups.
-author: dillionverma
-published: true
----
-
-<div className="max-w-[800px]">
- <video
- autoPlay
- loop
- muted
- src="/startup-template-demo.mp4"
- className="w-full rounded-xl border shadow-2xl"
- />
- <div className="flex sm:flex-row gap-2 w-full flex-col">
- <RepoDownload repo={'startup-template'} owner={'dillionverma'} />
- <TemplatePreview href="https://startup-template-sage.vercel.app/">Live Preview </TemplatePreview>
- </div>
-</div>
-
-
-
-### What is this?
-A complete landing page template to launch a new project or idea (frontend only). Uses the latest frontend technologies and best practices to unblock you and delight your customers.
-
-
-### Who is this for?
-You are an indiehacker, bootstrapper, YC startup, solopreneur, VC-backed startup, developer, or student. You are thinking about launching a new idea or already have a prototype. Maybe it's an AI SaaS, a crazy drone robot company, or just a simple digital product. But... you dread the idea of learning react or anything frontend 😩
-
-**This template is exactly what you're looking for.**
-
-### Why should I use this?
-- ✅ Save 100+ hours of work
-- ✅ No need to learn advanced animations
-- ✅ Easy to configure and change
-- ✅ 1-click download and setup.
-- ✅ 5 minutes to update the text and images.
-- ✅ Deploy live to vercel
-
-### Features
-- Header Section
-- Hero Section
-- Social Proof Section
-- Pricing Section
-- Call To Action Section
-- Footer Section
-- Mobile Reponsive Navbar
-
-### Tech Stack
-<TechStack technologies={["nextjs", "react", "typescript", "tailwindcss", "framermotion", "shadcn" ]}/ >
-
-### Changelog
-<CommitList repo='startup-template' owner='dillionverma' />
diff --git a/emails/LoginLink.tsx b/emails/LoginLink.tsx
deleted file mode 100644
index 53dd15cf..00000000
--- a/emails/LoginLink.tsx
+++ /dev/null
@@ -1,86 +0,0 @@
-import { Body } from "@react-email/body";
-import { Button } from "@react-email/button";
-import { Container } from "@react-email/container";
-import { Font } from "@react-email/font";
-import { Head } from "@react-email/head";
-import { Heading } from "@react-email/heading";
-import { Hr } from "@react-email/hr";
-import { Html } from "@react-email/html";
-import { Img } from "@react-email/img";
-import { Preview } from "@react-email/preview";
-import { Section } from "@react-email/section";
-import { Tailwind } from "@react-email/tailwind";
-import { Text } from "@react-email/text";
-
-interface Props {
- firstName?: string;
- loginLink?: string;
-}
-
-const Email = ({ firstName, loginLink = "https://magicui.design" }: Props) => {
- const previewText = firstName
- ? `Welcome to Magic UI, ${firstName}!`
- : `Welcome to Magic UI!`;
-
- return (
- <Html>
- <Head>
- <Font
- fontFamily="sans-serif"
- fallbackFontFamily="Arial"
- fontWeight={400}
- fontStyle="normal"
- />
- </Head>
- <Preview>{previewText}</Preview>
- <Tailwind>
- <Body className="mx-auto my-auto bg-white font-sans">
- <Container className="mx-auto my-[40px] w-[465px] max-w-[465px] rounded border border-solid border-[#eaeaea] p-[20px]">
- <Section className="mt-[32px]">
- <Img
- src={`https://magicui.design/icon.png`}
- width="40"
- height="37"
- alt="Magic UI"
- className="mx-auto my-0"
- />
- </Section>
- <Heading className="mx-0 my-[30px] p-0 text-center text-[24px] font-normal text-black">
- Welcome to <strong>Magic UI</strong> 🎉
- </Heading>
- {/* <Text className="text-black text-[14px] leading-[24px]">
- {firstName && `Hello ${firstName} 👋`}
- {!firstName && `Hello 👋`}
- </Text> */}
- <Text className="text-[14px] leading-[24px] text-black">
- Click the link below to login to your account.
- </Text>
-
- <Section className="mb-[20px] mt-[20px] text-center">
- <Button
- className="rounded bg-[#000000] px-5 py-3 text-center text-[12px] font-semibold text-white no-underline"
- href={loginLink}
- >
- Get Started
- </Button>
- </Section>
-
- {/* <Text className="text-black text-[14px] leading-[24px]">
- or copy and paste this URL into your browser:{" "}
- <Link href={loginLink} className="text-blue-600 no-underline">
- {loginLink}
- </Link>
- </Text> */}
- <Hr className="mx-0 my-[26px] w-full border-[#eaeaea]" />
- <Text className="text-[12px] leading-[24px] text-[#666666]">
- If you were not expecting this invitation, you can ignore this
- email.
- </Text>
- </Container>
- </Body>
- </Tailwind>
- </Html>
- );
-};
-
-export default Email;
diff --git a/emails/lib/utils.ts b/emails/lib/utils.ts
deleted file mode 100644
index 70f56a54..00000000
--- a/emails/lib/utils.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import clsx, { ClassValue } from "clsx";
-import { twMerge } from "tailwind-merge";
-
-export function cn(...inputs: ClassValue[]) {
- return twMerge(clsx(inputs));
-}
diff --git a/env.mjs b/env.mjs
index b2bd1cb1..a8f93cd9 100644
--- a/env.mjs
+++ b/env.mjs
@@ -6,26 +6,7 @@ export const env = createEnv({
* Serverside Environment variables, not available on the client.
* Will throw if you access these variables on the client.
*/
- server: {
- // This is optional because it's only used in development.
- // See https://next-auth.js.org/deployment.
- NEXTAUTH_URL: z.string().url().optional(),
- NEXTAUTH_SECRET: z.string().min(1),
- // GITHUB_CLIENT_ID: z.string().min(1),
- // GITHUB_CLIENT_SECRET: z.string().min(1),
- // GITHUB_ACCESS_TOKEN: z.string().min(1),
- DATABASE_URL: z.string().min(1),
- RESEND_API_KEY: z.string().optional(),
- STRIPE_API_KEY: z.string().optional(),
- STRIPE_WEBHOOK_SECRET: z.string().optional(),
- // SMTP_FROM: z.string().min(1),
- // POSTMARK_API_TOKEN: z.string().min(1),
- // POSTMARK_SIGN_IN_TEMPLATE: z.string().min(1),
- // POSTMARK_ACTIVATION_TEMPLATE: z.string().min(1),
- // STRIPE_API_KEY: z.string().min(1),
- // STRIPE_WEBHOOK_SECRET: z.string().min(1),
- // STRIPE_PRO_MONTHLY_PLAN_ID: z.string().min(1),
- },
+ server: {},
/*
* Environment variables available on the client (and server).
*
@@ -33,8 +14,6 @@ export const env = createEnv({
*/
client: {
NEXT_PUBLIC_APP_URL: z.string().min(1),
- NEXT_PUBLIC_STRIPE_PAYMENT_LINK: z.string().min(1),
- NEXT_PUBLIC_POSTHOG_API_KEY: z.string().optional(),
},
/*
@@ -44,26 +23,6 @@ export const env = createEnv({
* 💡 You'll get type errors if not all variables from `server` & `client` are included here.
*/
runtimeEnv: {
- NEXTAUTH_URL: process.env.NEXTAUTH_URL,
- NEXTAUTH_SECRET: process.env.NEXTAUTH_SECRET,
- // GITHUB_CLIENT_ID: process.env.GITHUB_CLIENT_ID,
- // GITHUB_CLIENT_SECRET: process.env.GITHUB_CLIENT_SECRET,
- // GITHUB_ACCESS_TOKEN: process.env.GITHUB_ACCESS_TOKEN,
- DATABASE_URL: process.env.DATABASE_URL,
- RESEND_API_KEY: process.env.RESEND_API_KEY,
- STRIPE_API_KEY: process.env.STRIPE_API_KEY,
- STRIPE_WEBHOOK_SECRET: process.env.STRIPE_WEBHOOK_SECRET,
- // SMTP_FROM: process.env.SMTP_FROM,
- // POSTMARK_API_TOKEN: process.env.POSTMARK_API_TOKEN,
- // POSTMARK_SIGN_IN_TEMPLATE: process.env.POSTMARK_SIGN_IN_TEMPLATE,
- // POSTMARK_ACTIVATION_TEMPLATE: process.env.POSTMARK_ACTIVATION_TEMPLATE,
- // STRIPE_API_KEY: process.env.STRIPE_API_KEY,
- // STRIPE_WEBHOOK_SECRET: process.env.STRIPE_WEBHOOK_SECRET,
- // STRIPE_PRO_MONTHLY_PLAN_ID: process.env.STRIPE_PRO_MONTHLY_PLAN_ID,
NEXT_PUBLIC_APP_URL: process.env.NEXT_PUBLIC_APP_URL,
- NEXT_PUBLIC_STRIPE_PAYMENT_LINK:
- process.env.NEXT_PUBLIC_STRIPE_PAYMENT_LINK,
-
- NEXT_PUBLIC_POSTHOG_API_KEY: process.env.NEXT_PUBLIC_POSTHOG_API_KEY,
},
});
diff --git a/lib/auth.ts b/lib/auth.ts
deleted file mode 100644
index 4cfd4da6..00000000
--- a/lib/auth.ts
+++ /dev/null
@@ -1,99 +0,0 @@
-import { db } from "@/lib/db";
-import { EMAIL_FROM } from "@/lib/emails/constants";
-import { PrismaAdapter } from "@next-auth/prisma-adapter";
-import { NextAuthOptions } from "next-auth";
-import EmailProvider from "next-auth/providers/email";
-import GitHubProvider, { GithubProfile } from "next-auth/providers/github";
-import posthog from "posthog-js";
-import { sendLoginEmail } from "./emails/send-login-email";
-import { upsertCustomer } from "./stripe-utils";
-
-export const authOptions: NextAuthOptions = {
- adapter: PrismaAdapter(db),
- secret: process.env.NEXTAUTH_SECRET!,
- session: { strategy: "jwt" },
- pages: {
- signIn: "/login",
- },
-
- providers: [
- GitHubProvider({
- clientId: process.env.GITHUB_ID!,
- clientSecret: process.env.GITHUB_SECRET!,
- allowDangerousEmailAccountLinking: true,
- profile(profile: GithubProfile) {
- return {
- id: profile.id.toString(),
- name: profile.name,
- userName: profile.login,
- email: profile.email,
- image: profile.avatar_url,
- };
- },
- }),
- EmailProvider({
- type: "email",
- server: "",
- from: EMAIL_FROM,
- sendVerificationRequest: async ({
- identifier: email,
- url,
- token,
- provider: { server, from },
- }) => {
- await sendLoginEmail({ email, url });
- },
- }),
- ],
- callbacks: {
- async session({ token, session }) {
- if (token) {
- session.user.id = token.id;
- session.user.name = token.name;
- session.user.email = token.email;
- session.user.image = token.picture;
- }
-
- return session;
- },
- async jwt({ token, user }) {
- const dbUser = await db.user.findFirst({
- where: {
- email: token.email,
- },
- });
-
- if (!dbUser) {
- if (user) {
- token.id = user?.id;
- }
- return token;
- }
-
- return {
- id: dbUser.id,
- name: dbUser.name,
- email: dbUser.email,
- picture: dbUser.image,
- };
- },
- },
- events: {
- async createUser(message) {
- const params = {
- user: {
- name: message.user.name,
- email: message.user.email,
- },
- };
-
- if (message.user.email) {
- await upsertCustomer(message.user.email!, message.user.name!);
- posthog.capture("user_created", {
- distinct_id: message.user.email,
- });
- // await sendWelcomeEmail(params); // <-- send welcome email
- }
- },
- },
-};
diff --git a/lib/db.ts b/lib/db.ts
deleted file mode 100644
index 9e6e3913..00000000
--- a/lib/db.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { PrismaClient } from "@prisma/client";
-
-const globalForPrisma = globalThis as unknown as {
- prisma: PrismaClient | undefined;
-};
-
-const prisma = globalForPrisma.prisma ?? new PrismaClient();
-
-if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;
-
-export const db = prisma;
diff --git a/lib/emails/constants.ts b/lib/emails/constants.ts
deleted file mode 100644
index 87ab2c0e..00000000
--- a/lib/emails/constants.ts
+++ /dev/null
@@ -1 +0,0 @@
-export const EMAIL_FROM = "Dillion <[email protected]>";
diff --git a/lib/emails/send-login-email.ts b/lib/emails/send-login-email.ts
deleted file mode 100644
index 44615ad1..00000000
--- a/lib/emails/send-login-email.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import LoginLink from "@/emails/LoginLink";
-import { resend } from "@/lib/resend";
-import { EMAIL_FROM } from "./constants";
-
-export async function sendLoginEmail({
- name,
- email,
- url,
-}: {
- name?: string | null | undefined;
- email: string | null | undefined;
- url: string;
-}) {
- const emailTemplate = LoginLink({ loginLink: url });
- try {
- await resend.emails.send({
- from: EMAIL_FROM,
- to: email as string,
- subject: "Welcome to Magic UI!",
- react: emailTemplate,
- });
- } catch (error) {
- // Log any errors and re-throw the error
- console.log({ error });
- throw error;
- }
-}
diff --git a/lib/octokit.ts b/lib/octokit.ts
deleted file mode 100644
index df0028cf..00000000
--- a/lib/octokit.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { Octokit } from "octokit";
-
-export const octokit = new Octokit({
- auth: process.env.GITHUB_ACCESS_TOKEN,
-});
diff --git a/lib/resend.ts b/lib/resend.ts
deleted file mode 100644
index 295c0330..00000000
--- a/lib/resend.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-import { Resend } from "resend";
-
-export const resend = new Resend(process.env.RESEND_API_KEY!);
diff --git a/lib/session.ts b/lib/session.ts
deleted file mode 100644
index 89c9a898..00000000
--- a/lib/session.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { authOptions } from "@/lib/auth";
-import { getServerSession } from "next-auth/next";
-
-export async function getCurrentUser() {
- const session = await getServerSession(authOptions);
-
- return session?.user;
-}
diff --git a/lib/stripe-utils.ts b/lib/stripe-utils.ts
deleted file mode 100644
index 71aeefaf..00000000
--- a/lib/stripe-utils.ts
+++ /dev/null
@@ -1,105 +0,0 @@
-import { db } from "@/lib/db";
-import { stripe } from "@/lib/stripe";
-import { UserPayments } from "@/types";
-
-export async function getUserPayments(userId: string): Promise<UserPayments> {
- const user = await db.user.findFirst({
- where: {
- id: userId,
- },
- include: {
- customer: {
- include: {
- payments: true,
- },
- },
- },
- });
-
- if (!user) {
- throw new Error("User not found");
- }
-
- if (!user.customer) {
- throw new Error("Customer not found");
- }
-
- return {
- ...user,
- payments: user.customer.payments,
- };
-
- // Check if user is on a pro plan.
- // const isPro = user.stripePriceId === proPlan.stripePriceId;
- // user.stripeCurrentPeriodEnd?.getTime() + 86_400_000 > Date.now();
-
- // const plan = isPro ? proPlan : freePlan;
-
- // return {
- // ...plan,
- // ...user,
- // // stripeCurrentPeriodEnd: user.stripeCurrentPeriodEnd?.getTime(),
- // isPro,
- // };
-}
-
-export const upsertPayment = async (
- paymentIntent: string,
- customerId: string,
-) => {
- const p = await stripe.paymentIntents.retrieve(paymentIntent);
-
- const payment = await db.payment.create({
- data: {
- stripeId: paymentIntent,
- amount: p.amount,
- currency: p.currency,
- status: p.status,
- customerId: customerId,
- },
- });
-
- console.log(p);
-};
-
-export const upsertCustomer = async (email: string, name?: string) => {
- // Create or update user in our table
- const user = await db.user.upsert({
- where: { email },
- create: { email, name },
- update: { email, name },
- });
-
- const stripeCustomers = await stripe.customers.list({
- email,
- limit: 1,
- });
-
- let stripeCustomer = stripeCustomers.data[0];
-
- if (stripeCustomers.data.length === 0) {
- stripeCustomer = await stripe.customers.create({
- email,
- name,
- metadata: {
- userId: user.id,
- },
- });
- }
-
- // create or update customer in our table
- const customer = await db.customer.upsert({
- where: {
- userId: user.id,
- },
- create: {
- stripeId: stripeCustomer.id,
- userId: user.id,
- },
- update: {
- stripeId: stripeCustomer.id,
- },
- });
-
- return customer;
-};
diff --git a/lib/stripe.ts b/lib/stripe.ts
deleted file mode 100644
index 77dc2a26..00000000
--- a/lib/stripe.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import Stripe from "stripe";
-
-import { env } from "@/env.mjs";
-
-export const stripe = new Stripe(env.STRIPE_API_KEY!, {
- apiVersion: "2022-11-15",
- typescript: true,
-});
diff --git a/lib/stripe/get-customer.ts b/lib/stripe/get-customer.ts
deleted file mode 100644
index fa0e5621..00000000
--- a/lib/stripe/get-customer.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { stripe } from "@/lib/stripe";
-
-export const getStripeCustomerByEmail = async (email: string) => {
- const foundStripeCustomers = await stripe.customers.list({
- email,
- });
-
- return foundStripeCustomers.data[0] ?? null;
-};
-
-export const getStripeCustomerById = async (stripeCustomerId: string) => {
- try {
- const stripeCustomer = await stripe.customers.retrieve(stripeCustomerId);
-
- return !stripeCustomer.deleted ? stripeCustomer : null;
- } catch {
- return null;
- }
-};
diff --git a/lib/stripe/get-portal-session.ts b/lib/stripe/get-portal-session.ts
deleted file mode 100644
index 25654fa3..00000000
--- a/lib/stripe/get-portal-session.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-"use server";
-
-import { stripe } from "@/lib/stripe";
-
-export type GetPortalSessionOptions = {
- customerId: string;
- returnUrl: string;
-};
-
-export const getPortalSession = async ({
- customerId,
- returnUrl,
-}: GetPortalSessionOptions) => {
- "use server";
-
- const session = await stripe.billingPortal.sessions.create({
- customer: customerId,
- return_url: returnUrl,
- });
-
- return session.url;
-};
diff --git a/hooks/use-mounted.ts b/lib/use-mounted.ts
similarity index 100%
rename from hooks/use-mounted.ts
rename to lib/use-mounted.ts
diff --git a/lib/validations/auth.ts b/lib/validations/auth.ts
deleted file mode 100644
index dab29013..00000000
--- a/lib/validations/auth.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import * as z from "zod";
-
-export const userAuthSchema = z.object({
- email: z.string().email(),
-});
diff --git a/lib/validations/user.ts b/lib/validations/user.ts
deleted file mode 100644
index 3553cd57..00000000
--- a/lib/validations/user.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import * as z from "zod";
-
-export const userNameSchema = z.object({
- name: z.string().min(3).max(32),
-});
diff --git a/next.config.js b/next.config.js
index 14c2ae52..ed90f246 100644
--- a/next.config.js
+++ b/next.config.js
@@ -26,7 +26,7 @@ const nextConfig = {
},
{
source: "/components",
- destination: "/docs/components/animated-beam",
+ destination: "/docs/components/bento-grid",
permanent: true,
},
{
@@ -36,17 +36,7 @@ const nextConfig = {
},
{
source: "/docs/components",
- destination: "/docs/components/animated-beam",
- permanent: true,
- },
- {
- source: "/sections",
- destination: "/docs/sections/call-to-action",
- permanent: true,
- },
- {
- source: "/docs/sections",
- destination: "/docs/sections/call-to-action",
+ destination: "/docs/components/bento-grid",
permanent: true,
},
];
diff --git a/package.json b/package.json
index 81a70bfa..f7c278cf 100644
--- a/package.json
+++ b/package.json
@@ -130,5 +130,5 @@
"node": ">=20.6.1",
"pnpm": ">=9"
},
- "packageManager": "[email protected]"
+ "packageManager": "[email protected]"
}
diff --git a/pages/api/auth/[...nextauth].ts b/pages/api/auth/[...nextauth].ts
deleted file mode 100644
index a4d9a60c..00000000
--- a/pages/api/auth/[...nextauth].ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import NextAuth from "next-auth";
-
-import { authOptions } from "@/lib/auth";
-
-// @see ./lib/auth
-export default NextAuth(authOptions);
diff --git a/registry/blocks/example/call-to-action-1.tsx b/registry/blocks/example/call-to-action-1.tsx
deleted file mode 100644
index e6d99dbb..00000000
--- a/registry/blocks/example/call-to-action-1.tsx
+++ /dev/null
@@ -1,166 +0,0 @@
-import { buttonVariants } from "@/components/ui/button";
-import { cn } from "@/lib/utils";
-import Marquee from "@/registry/components/magicui/marquee";
-import { ChevronRight, HeartHandshake } from "lucide-react";
-
-const reviews = [
- {
- name: "Jack",
- username: "@jack",
- body: "I've never seen anything like this before. It's amazing. I love it.",
- img: "https://avatar.vercel.sh/jack",
- },
- {
- name: "Jill",
- username: "@jill",
- body: "I don't know what to say. I'm speechless. This is amazing.",
- img: "https://avatar.vercel.sh/jill",
- },
- {
- name: "John",
- username: "@john",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/john",
- },
- {
- name: "Jane",
- username: "@jane",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/jane",
- },
- {
- name: "Jenny",
- username: "@jenny",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/jenny",
- },
- {
- name: "James",
- username: "@james",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/james",
- },
-];
-
-const firstRow = reviews.slice(0, reviews.length / 2);
-const secondRow = reviews.slice(reviews.length / 2);
-
-const ReviewCard = ({
- img,
- name,
- username,
- body,
-}: {
- img: string;
- name: string;
- username: string;
- body: string;
-}) => {
- return (
- <figure
- className={cn(
- "relative w-64 cursor-pointer overflow-hidden rounded-[2rem] border p-4",
- // light styles
- "border-gray-950/[.1] bg-gray-950/[.01] hover:bg-gray-950/[.05]",
- // dark styles
- "dark:border-gray-50/[.1] dark:bg-gray-50/[.10] dark:hover:bg-gray-50/[.15]",
- )}
- >
- <div className="flex flex-row items-center gap-2">
- <img className="rounded-full" width="32" height="32" alt="" src={img} />
- <div className="flex flex-col">
- <figcaption className="text-sm font-medium dark:text-white">
- {name}
- </figcaption>
- <p className="text-xs font-medium dark:text-white/40">{username}</p>
- </div>
- </div>
- <blockquote className="mt-2 text-sm">{body}</blockquote>
- </figure>
- );
-};
-
-export default function CallToAction() {
- return (
- <section id="cta">
- <div className="py-14">
- <div className="container flex w-full flex-col items-center justify-center p-4">
- <div className="relative flex w-full max-w-[1000px] flex-col items-center justify-center overflow-hidden rounded-[2rem] border p-10 py-14">
- <div className="absolute rotate-[35deg]">
- <Marquee pauseOnHover className="[--duration:20s]" repeat={3}>
- {firstRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee
- reverse
- pauseOnHover
- className="[--duration:20s]"
- repeat={3}
- >
- {secondRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee pauseOnHover className="[--duration:20s]" repeat={3}>
- {firstRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee
- reverse
- pauseOnHover
- className="[--duration:20s]"
- repeat={3}
- >
- {secondRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee pauseOnHover className="[--duration:20s]" repeat={3}>
- {firstRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee
- reverse
- pauseOnHover
- className="[--duration:20s]"
- repeat={3}
- >
- {secondRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- </div>
- <div className="z-10 mx-auto size-24 rounded-[2rem] border bg-white/10 p-3 shadow-2xl backdrop-blur-md dark:bg-black/10 lg:size-32">
- <HeartHandshake className="mx-auto size-16 text-black dark:text-white lg:size-24" />
- </div>
- <div className="z-10 mt-4 flex flex-col items-center text-center text-black dark:text-white">
- <h1 className="text-3xl font-bold lg:text-4xl">
- Stop wasting time on design.
- </h1>
- <p className="mt-2">
- Start your 7-day free trial. No credit card required.
- </p>
- <a
- href="/"
- className={cn(
- buttonVariants({
- size: "lg",
- variant: "outline",
- }),
- "group mt-4 rounded-[2rem] px-6",
- )}
- >
- Get Started
- <ChevronRight className="ml-1 size-4 transition-all duration-300 ease-out group-hover:translate-x-1" />
- </a>
- </div>
- <div className="absolute inset-x-0 bottom-0 h-full bg-gradient-to-b from-transparent to-white to-70% dark:to-black" />
- </div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/call-to-action-2.tsx b/registry/blocks/example/call-to-action-2.tsx
deleted file mode 100644
index ef3318a3..00000000
--- a/registry/blocks/example/call-to-action-2.tsx
+++ /dev/null
@@ -1,191 +0,0 @@
-"use client";
-
-import { buttonVariants } from "@/components/ui/button";
-import { cn } from "@/lib/utils";
-import Marquee from "@/registry/components/magicui/marquee";
-import { motion, useAnimation, useInView } from "framer-motion";
-import {
- BarChart,
- ChevronRight,
- File,
- Globe,
- HeartHandshake,
- Rss,
- Shield,
-} from "lucide-react";
-import { useEffect, useId, useRef, useState } from "react";
-
-const tiles = [
- {
- icon: <HeartHandshake className="size-full" />,
- bg: (
- <div className="pointer-events-none absolute left-1/2 top-1/2 h-1/2 w-1/2 -translate-x-1/2 -translate-y-1/2 overflow-visible rounded-full bg-gradient-to-r from-orange-600 via-rose-600 to-violet-600 opacity-70 blur-[20px] filter"></div>
- ),
- },
- {
- icon: <Globe className="size-full" />,
- bg: (
- <div className="pointer-events-none absolute left-1/2 top-1/2 h-1/2 w-1/2 -translate-x-1/2 -translate-y-1/2 overflow-visible rounded-full bg-gradient-to-r from-cyan-500 via-blue-500 to-indigo-500 opacity-70 blur-[20px] filter"></div>
- ),
- },
- {
- icon: <File className="size-full" />,
- bg: (
- <div className="pointer-events-none absolute left-1/2 top-1/2 h-1/2 w-1/2 -translate-x-1/2 -translate-y-1/2 overflow-visible rounded-full bg-gradient-to-r from-green-500 via-teal-500 to-emerald-600 opacity-70 blur-[20px] filter"></div>
- ),
- },
- {
- icon: <Shield className="size-full" />,
- bg: (
- <div className="pointer-events-none absolute left-1/2 top-1/2 h-1/2 w-1/2 -translate-x-1/2 -translate-y-1/2 overflow-visible rounded-full bg-gradient-to-r from-yellow-400 via-orange-500 to-yellow-600 opacity-70 blur-[20px] filter"></div>
- ),
- },
- {
- icon: <Rss className="size-full" />,
- bg: (
- <div className="pointer-events-none absolute left-1/2 top-1/2 h-1/2 w-1/2 -translate-x-1/2 -translate-y-1/2 overflow-visible rounded-full bg-gradient-to-r from-orange-600 via-rose-600 to-violet-600 opacity-70 blur-[20px] filter"></div>
- ),
- },
- {
- icon: <BarChart className="size-full" />,
- bg: (
- <div className="pointer-events-none absolute left-1/2 top-1/2 h-1/2 w-1/2 -translate-x-1/2 -translate-y-1/2 overflow-visible rounded-full bg-gradient-to-r from-gray-600 via-gray-500 to-gray-400 opacity-70 blur-[20px] filter"></div>
- ),
- },
-];
-
-const shuffleArray = (array: any[]) => {
- let currentIndex = array.length,
- randomIndex;
- // While there remain elements to shuffle.
- while (currentIndex !== 0) {
- // Pick a remaining element.
- randomIndex = Math.floor(Math.random() * currentIndex);
- currentIndex--;
- // And swap it with the current element.
- [array[currentIndex], array[randomIndex]] = [
- array[randomIndex],
- array[currentIndex],
- ];
- }
- return array;
-};
-
-const Card = (card: { icon: JSX.Element; bg: JSX.Element }) => {
- const id = useId();
- const controls = useAnimation();
- const ref = useRef(null);
- const inView = useInView(ref, { once: true });
-
- useEffect(() => {
- if (inView) {
- controls.start({
- opacity: 1,
- transition: { delay: Math.random() * 2, ease: "easeOut", duration: 1 },
- });
- }
- }, [controls, inView]);
-
- return (
- <motion.div
- key={id}
- ref={ref}
- initial={{ opacity: 0 }}
- animate={controls}
- className={cn(
- "relative size-20 cursor-pointer overflow-hidden rounded-2xl border p-4",
- // light styles
- "bg-white [box-shadow:0_0_0_1px_rgba(0,0,0,.03),0_2px_4px_rgba(0,0,0,.05),0_12px_24px_rgba(0,0,0,.05)]",
- // dark styles
- "transform-gpu dark:bg-transparent dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]",
- )}
- >
- {card.icon}
- {card.bg}
- </motion.div>
- );
-};
-
-export default function CallToAction() {
- const [randomTiles1, setRandomTiles1] = useState<typeof tiles>([]);
- const [randomTiles2, setRandomTiles2] = useState<typeof tiles>([]);
- const [randomTiles3, setRandomTiles3] = useState<typeof tiles>([]);
- const [randomTiles4, setRandomTiles4] = useState<typeof tiles>([]);
-
- useEffect(() => {
- if (typeof window !== "undefined") {
- // Ensures this runs client-side
- setRandomTiles1(shuffleArray([...tiles]));
- setRandomTiles2(shuffleArray([...tiles]));
- setRandomTiles3(shuffleArray([...tiles]));
- setRandomTiles4(shuffleArray([...tiles]));
- }
- }, []);
-
- return (
- <section id="cta">
- <div className="py-14">
- <div className="container flex w-full flex-col items-center justify-center p-4">
- <div className="relative flex w-full max-w-[1000px] flex-col items-center justify-center overflow-hidden rounded-[2rem] border">
- <Marquee
- reverse
- className="-delay-[200ms] [--duration:20s]"
- repeat={4}
- >
- {randomTiles1.map((review, idx) => (
- <Card key={idx} {...review} />
- ))}
- </Marquee>
- <Marquee reverse className="[--duration:30s]" repeat={4}>
- {randomTiles2.map((review, idx) => (
- <Card key={idx} {...review} />
- ))}
- </Marquee>
- <Marquee
- reverse
- className="-delay-[200ms] [--duration:20s]"
- repeat={4}
- >
- {randomTiles3.map((review, idx) => (
- <Card key={idx} {...review} />
- ))}
- </Marquee>
- <Marquee reverse className="[--duration:30s]" repeat={4}>
- {randomTiles4.map((review, idx) => (
- <Card key={idx} {...review} />
- ))}
- </Marquee>
- <div className="absolute z-10">
- <div className="mx-auto size-24 rounded-[2rem] border bg-white/10 p-3 shadow-2xl backdrop-blur-md dark:bg-black/10 lg:size-32">
- <HeartHandshake className="mx-auto size-16 text-black dark:text-white lg:size-24" />
- </div>
- <div className="z-10 mt-4 flex flex-col items-center text-center text-primary">
- <h1 className="text-3xl font-bold lg:text-4xl">
- Stop wasting time on design.
- </h1>
- <p className="mt-2">
- Start your 7-day free trial. No credit card required.
- </p>
- <a
- href="/"
- className={cn(
- buttonVariants({
- size: "lg",
- variant: "outline",
- }),
- "group mt-4 rounded-[2rem] px-6",
- )}
- >
- Get Started
- <ChevronRight className="ml-1 size-4 transition-all duration-300 ease-out group-hover:translate-x-1" />
- </a>
- </div>
- <div className="absolute inset-0 -z-10 rounded-full bg-white opacity-40 blur-xl dark:bg-black" />
- </div>
- <div className="absolute inset-x-0 bottom-0 h-full bg-gradient-to-b from-transparent to-white to-70% dark:to-black" />
- </div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/call-to-action-3.tsx b/registry/blocks/example/call-to-action-3.tsx
deleted file mode 100644
index ef215b92..00000000
--- a/registry/blocks/example/call-to-action-3.tsx
+++ /dev/null
@@ -1,167 +0,0 @@
-import { buttonVariants } from "@/components/ui/button";
-import { cn } from "@/lib/utils";
-import Marquee from "@/registry/components/magicui/marquee";
-import { ChevronRight, HeartHandshake } from "lucide-react";
-import Link from "next/link";
-
-const reviews = [
- {
- name: "Jack",
- username: "@jack",
- body: "I've never seen anything like this before. It's amazing. I love it.",
- img: "https://avatar.vercel.sh/jack",
- },
- {
- name: "Jill",
- username: "@jill",
- body: "I don't know what to say. I'm speechless. This is amazing.",
- img: "https://avatar.vercel.sh/jill",
- },
- {
- name: "John",
- username: "@john",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/john",
- },
- {
- name: "Jane",
- username: "@jane",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/jane",
- },
- {
- name: "Jenny",
- username: "@jenny",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/jenny",
- },
- {
- name: "James",
- username: "@james",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/james",
- },
-];
-
-const firstRow = reviews.slice(0, reviews.length / 2);
-const secondRow = reviews.slice(reviews.length / 2);
-
-const ReviewCard = ({
- img,
- name,
- username,
- body,
-}: {
- img: string;
- name: string;
- username: string;
- body: string;
-}) => {
- return (
- <figure
- className={cn(
- "relative w-64 cursor-pointer overflow-hidden rounded-[2rem] border p-4",
- // light styles
- "border-gray-950/[.1] bg-gray-950/[.01] hover:bg-gray-950/[.05]",
- // dark styles
- "dark:border-gray-50/[.1] dark:bg-gray-50/[.10] dark:hover:bg-gray-50/[.15]",
- )}
- >
- <div className="flex flex-row items-center gap-2">
- <img className="rounded-full" width="32" height="32" alt="" src={img} />
- <div className="flex flex-col">
- <figcaption className="text-sm font-medium dark:text-white">
- {name}
- </figcaption>
- <p className="text-xs font-medium dark:text-white/40">{username}</p>
- </div>
- </div>
- <blockquote className="mt-2 text-sm">{body}</blockquote>
- </figure>
- );
-};
-
-export default function CallToAction() {
- return (
- <section id="cta">
- <div className="py-14">
- <div className="container flex w-full flex-col items-center justify-center p-4">
- <div className="relative flex w-full max-w-[1000px] flex-col items-center justify-center overflow-hidden rounded-[2rem] border p-10 py-14">
- <div className="absolute rotate-[-35deg]">
- <Marquee pauseOnHover className="[--duration:20s]" repeat={3}>
- {firstRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee
- reverse
- pauseOnHover
- className="[--duration:20s]"
- repeat={3}
- >
- {secondRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee pauseOnHover className="[--duration:20s]" repeat={3}>
- {firstRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee
- reverse
- pauseOnHover
- className="[--duration:20s]"
- repeat={3}
- >
- {secondRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee pauseOnHover className="[--duration:20s]" repeat={3}>
- {firstRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee
- reverse
- pauseOnHover
- className="[--duration:20s]"
- repeat={3}
- >
- {secondRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- </div>
- <div className="z-10 rounded-[2rem] border bg-background/10 p-3 shadow-2xl backdrop-blur-md">
- <HeartHandshake className="size-16 text-black dark:text-white lg:size-24" />
- </div>
- <div className="z-10 mt-4 flex flex-col items-center text-center text-primary">
- <h1 className="text-3xl font-bold lg:text-4xl">
- Stop wasting time on design.
- </h1>
- <p className="mt-2">
- Start your 7-day free trial. No credit card required.
- </p>
- <Link
- href={{ pathname: "/" }}
- className={cn(
- buttonVariants({
- size: "lg",
- variant: "secondary",
- }),
- "group mt-4 rounded-[2rem] px-6",
- )}
- >
- Get Started
- <ChevronRight className="ml-1 size-4 transition-all duration-300 ease-out group-hover:translate-x-1" />
- </Link>
- </div>
- <div className="absolute inset-x-0 bottom-0 h-full bg-gradient-to-b from-transparent to-white to-70% dark:to-black" />
- </div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/call-to-action-4.tsx b/registry/blocks/example/call-to-action-4.tsx
deleted file mode 100644
index ef215b92..00000000
--- a/registry/blocks/example/call-to-action-4.tsx
+++ /dev/null
@@ -1,167 +0,0 @@
-import { buttonVariants } from "@/components/ui/button";
-import { cn } from "@/lib/utils";
-import Marquee from "@/registry/components/magicui/marquee";
-import { ChevronRight, HeartHandshake } from "lucide-react";
-import Link from "next/link";
-
-const reviews = [
- {
- name: "Jack",
- username: "@jack",
- body: "I've never seen anything like this before. It's amazing. I love it.",
- img: "https://avatar.vercel.sh/jack",
- },
- {
- name: "Jill",
- username: "@jill",
- body: "I don't know what to say. I'm speechless. This is amazing.",
- img: "https://avatar.vercel.sh/jill",
- },
- {
- name: "John",
- username: "@john",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/john",
- },
- {
- name: "Jane",
- username: "@jane",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/jane",
- },
- {
- name: "Jenny",
- username: "@jenny",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/jenny",
- },
- {
- name: "James",
- username: "@james",
- body: "I'm at a loss for words. This is amazing. I love it.",
- img: "https://avatar.vercel.sh/james",
- },
-];
-
-const firstRow = reviews.slice(0, reviews.length / 2);
-const secondRow = reviews.slice(reviews.length / 2);
-
-const ReviewCard = ({
- img,
- name,
- username,
- body,
-}: {
- img: string;
- name: string;
- username: string;
- body: string;
-}) => {
- return (
- <figure
- className={cn(
- "relative w-64 cursor-pointer overflow-hidden rounded-[2rem] border p-4",
- // light styles
- "border-gray-950/[.1] bg-gray-950/[.01] hover:bg-gray-950/[.05]",
- // dark styles
- "dark:border-gray-50/[.1] dark:bg-gray-50/[.10] dark:hover:bg-gray-50/[.15]",
- )}
- >
- <div className="flex flex-row items-center gap-2">
- <img className="rounded-full" width="32" height="32" alt="" src={img} />
- <div className="flex flex-col">
- <figcaption className="text-sm font-medium dark:text-white">
- {name}
- </figcaption>
- <p className="text-xs font-medium dark:text-white/40">{username}</p>
- </div>
- </div>
- <blockquote className="mt-2 text-sm">{body}</blockquote>
- </figure>
- );
-};
-
-export default function CallToAction() {
- return (
- <section id="cta">
- <div className="py-14">
- <div className="container flex w-full flex-col items-center justify-center p-4">
- <div className="relative flex w-full max-w-[1000px] flex-col items-center justify-center overflow-hidden rounded-[2rem] border p-10 py-14">
- <div className="absolute rotate-[-35deg]">
- <Marquee pauseOnHover className="[--duration:20s]" repeat={3}>
- {firstRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee
- reverse
- pauseOnHover
- className="[--duration:20s]"
- repeat={3}
- >
- {secondRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee pauseOnHover className="[--duration:20s]" repeat={3}>
- {firstRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee
- reverse
- pauseOnHover
- className="[--duration:20s]"
- repeat={3}
- >
- {secondRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee pauseOnHover className="[--duration:20s]" repeat={3}>
- {firstRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- <Marquee
- reverse
- pauseOnHover
- className="[--duration:20s]"
- repeat={3}
- >
- {secondRow.map((review) => (
- <ReviewCard key={review.username} {...review} />
- ))}
- </Marquee>
- </div>
- <div className="z-10 rounded-[2rem] border bg-background/10 p-3 shadow-2xl backdrop-blur-md">
- <HeartHandshake className="size-16 text-black dark:text-white lg:size-24" />
- </div>
- <div className="z-10 mt-4 flex flex-col items-center text-center text-primary">
- <h1 className="text-3xl font-bold lg:text-4xl">
- Stop wasting time on design.
- </h1>
- <p className="mt-2">
- Start your 7-day free trial. No credit card required.
- </p>
- <Link
- href={{ pathname: "/" }}
- className={cn(
- buttonVariants({
- size: "lg",
- variant: "secondary",
- }),
- "group mt-4 rounded-[2rem] px-6",
- )}
- >
- Get Started
- <ChevronRight className="ml-1 size-4 transition-all duration-300 ease-out group-hover:translate-x-1" />
- </Link>
- </div>
- <div className="absolute inset-x-0 bottom-0 h-full bg-gradient-to-b from-transparent to-white to-70% dark:to-black" />
- </div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/faq-1.tsx b/registry/blocks/example/faq-1.tsx
deleted file mode 100644
index c619c747..00000000
--- a/registry/blocks/example/faq-1.tsx
+++ /dev/null
@@ -1,136 +0,0 @@
-"use client";
-
-import {
- Accordion,
- AccordionContent,
- AccordionItem,
- AccordionTrigger,
-} from "@/components/ui/accordion";
-
-const faqs = [
- {
- section: "General",
- qa: [
- {
- question: "What is Magic UI?",
- answer: (
- <span>
- Magic UI is a React-based UI library designed to help developers
- build beautiful and interactive user interfaces with ease. It offers
- a wide range of customizable components.
- </span>
- ),
- },
- {
- question: "How can I get started with Magic UI?",
- answer: (
- <span>
- To get started, install the Magic UI package in your React project
- using your package manager. Explore our documentation for guides on
- using components and customizing your UI.
- </span>
- ),
- },
- ],
- },
- {
- section: "Support",
- qa: [
- {
- question: "Does Magic UI offer technical support?",
- answer: (
- <span>
- While Magic UI is primarily a self-serve library, we provide
- extensive documentation and a community forum where you can ask
- questions and share insights with other developers.
- </span>
- ),
- },
- ],
- },
- {
- section: "Customization",
- qa: [
- {
- question: "Can I customize Magic UI components?",
- answer: (
- <span>
- Absolutely! Magic UI is built with customization in mind. You can
- easily override styles and behaviors of components to match your
- design requirements.
- </span>
- ),
- },
- ],
- },
- {
- section: "Integration",
- qa: [
- {
- question: "How do I integrate Magic UI with my existing project?",
- answer: (
- <span>
- Magic UI can be integrated into any React project. Simply install
- the library, import the components you need, and start using them in
- your project. Our documentation provides detailed instructions for
- integration.
- </span>
- ),
- },
- ],
- },
-];
-
-export default function FAQ() {
- return (
- <section id="faq">
- <div className="py-14">
- <div className="container mx-auto px-4 md:px-8">
- <div className="mx-auto max-w-5xl text-center">
- <h4 className="text-xl font-bold tracking-tight text-black dark:text-white">
- FAQs
- </h4>
- <h2 className="text-4xl font-bold tracking-tight text-black dark:text-white sm:text-6xl">
- Frequently Asked Questions
- </h2>
- <p className="mt-6 text-xl leading-8 text-black/80 dark:text-white">
- Need help with something? Here are some of the most common
- questions we get.
- </p>
- </div>
- <div className="container mx-auto my-12 max-w-[600px] space-y-12">
- {faqs.map((faq, idx) => (
- <section key={idx} id={"faq-" + faq.section}>
- <h2 className="mb-4 text-left text-base font-semibold tracking-tight text-foreground/60">
- {faq.section}
- </h2>
- <Accordion
- type="single"
- collapsible
- className="flex w-full flex-col items-center justify-center"
- >
- {faq.qa.map((faq, idx) => (
- <AccordionItem
- key={idx}
- value={faq.question}
- className="w-full max-w-[600px]"
- >
- <AccordionTrigger>{faq.question}</AccordionTrigger>
- <AccordionContent>{faq.answer}</AccordionContent>
- </AccordionItem>
- ))}
- </Accordion>
- </section>
- ))}
- </div>
- <h4 className="mb-12 text-center text-sm font-medium tracking-tight text-foreground/80">
- Still have questions? Email us at{" "}
- <a href="mailto:[email protected]" className="underline">
- </a>
- </h4>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/footer-1.tsx b/registry/blocks/example/footer-1.tsx
deleted file mode 100644
index 626207d7..00000000
--- a/registry/blocks/example/footer-1.tsx
+++ /dev/null
@@ -1,178 +0,0 @@
-import { buttonVariants } from "@/components/ui/button";
-import { cn } from "@/lib/utils";
-import { LinkedInLogoIcon, TwitterLogoIcon } from "@radix-ui/react-icons";
-import { ChevronRight, HeartHandshake } from "lucide-react";
-
-const footerNavs = [
- {
- label: "Product",
- items: [
- {
- href: "/features",
- name: "Features",
- },
- {
- href: "/pricing",
- name: "Pricing",
- },
- {
- href: "/faq",
- name: "FAQ",
- },
- {
- href: "mailto:[email protected]",
- name: "Support",
- },
- ],
- },
- {
- label: "Company",
- items: [
- {
- href: "/about",
- name: "About Us",
- },
- {
- href: "/blog",
- name: "Blog",
- },
- {
- href: "/careers",
- name: "Careers",
- },
- {
- href: "/contact",
- name: "Contact",
- },
- ],
- },
- {
- label: "Resources",
- items: [
- {
- href: "/docs",
- name: "Documentation",
- },
- {
- href: "/api",
- name: "API Reference",
- },
- {
- href: "/community",
- name: "Community",
- },
- ],
- },
- {
- label: "Legal",
- items: [
- {
- href: "/privacy",
- name: "Privacy Policy",
- },
- {
- href: "/terms",
- name: "Terms of Service",
- },
- ],
- },
-];
-
-const footerSocials = [
- {
- href: "/",
- name: "Linkedin",
- icon: <LinkedInLogoIcon className="size-4" />,
- },
- {
- href: "/",
- name: "Twitter",
- icon: <TwitterLogoIcon className="size-4" />,
- },
-];
-
-export default function Footer() {
- return (
- <footer className="border-t">
- <div className="mx-auto w-full max-w-screen-xl px-4">
- <div className="gap-4 p-4 py-16 sm:pb-16 md:flex md:justify-between">
- <div className="mb-12 flex flex-col gap-4">
- <a href="/" className="flex items-center gap-2">
- <HeartHandshake className="size-8 text-black dark:text-white" />
- <span className="self-center whitespace-nowrap text-2xl font-semibold dark:text-white">
- Magic UI
- </span>
- </a>
- <div className="max-w-sm">
- <div className="z-10 mt-4 flex w-full flex-col items-start text-left">
- <h1 className="text-3xl font-bold lg:text-2xl">
- Get started today.
- </h1>
- <p className="mt-2">
- Start your 7-day free trial. No credit card required.
- </p>
- <a
- href="/signup"
- className={cn(
- buttonVariants({
- size: "lg",
- variant: "default",
- }),
- "group mt-4 w-full rounded-[2rem] px-6",
- )}
- >
- Sign Up Free
- <ChevronRight className="ml-1 size-4 transition-all duration-300 ease-out group-hover:translate-x-1" />
- </a>
- </div>
- </div>
- </div>
- <div className="grid grid-cols-1 gap-8 sm:grid-cols-4 sm:gap-6">
- {footerNavs.map((nav) => (
- <div key={nav.label}>
- <h2 className="mb-6 text-sm font-semibold uppercase text-gray-900 dark:text-white">
- {nav.label}
- </h2>
- <ul className="grid gap-2">
- {nav.items.map((item) => (
- <li key={item.name}>
- <a
- href={item.href}
- className="group inline-flex cursor-pointer items-center justify-start gap-1 text-gray-400 duration-200 hover:text-gray-600 hover:opacity-90 dark:text-gray-400 dark:hover:text-gray-200"
- >
- {item.name}
- <ChevronRight className="h-4 w-4 translate-x-0 transform opacity-0 transition-all duration-300 ease-out group-hover:translate-x-1 group-hover:opacity-100" />
- </a>
- </li>
- ))}
- </ul>
- </div>
- ))}
- </div>
- </div>
-
- <div className="flex flex-col gap-2 border-t py-4 sm:flex sm:flex-row sm:items-center sm:justify-between">
- <div className="flex space-x-5 sm:mt-0 sm:justify-center">
- {footerSocials.map((social) => (
- <a
- key={social.name}
- href={social.href}
- className="fill-gray-500 text-gray-500 hover:fill-gray-900 hover:text-gray-900 dark:hover:fill-gray-600 dark:hover:text-gray-600"
- >
- {social.icon}
- <span className="sr-only">{social.name}</span>
- </a>
- ))}
- </div>
- <span className="text-sm text-gray-500 dark:text-gray-400 sm:text-center">
- Copyright © {new Date().getFullYear()}{" "}
- <a href="/" className="cursor-pointer">
- Magic UI
- </a>
- . All Rights Reserved.
- </span>
- </div>
- </div>
- </footer>
- );
-}
diff --git a/registry/blocks/example/footer-2.tsx b/registry/blocks/example/footer-2.tsx
deleted file mode 100644
index e8a066a2..00000000
--- a/registry/blocks/example/footer-2.tsx
+++ /dev/null
@@ -1,180 +0,0 @@
-import { Icons } from "@/components/icons";
-import { buttonVariants } from "@/components/ui/button";
-import { cn } from "@/lib/utils";
-import { LinkedInLogoIcon } from "@radix-ui/react-icons";
-import { ChevronRight, HeartHandshake } from "lucide-react";
-
-const footerNavs = [
- {
- label: "Product",
- items: [
- {
- href: "/features",
- name: "Features",
- },
- {
- href: "/pricing",
- name: "Pricing",
- },
- {
- href: "/faq",
- name: "FAQ",
- },
- {
- href: "mailto:[email protected]",
- name: "Support",
- },
- ],
- },
- {
- label: "Company",
- items: [
- {
- href: "/about",
- name: "About Us",
- },
- {
- href: "/blog",
- name: "Blog",
- },
- {
- href: "/careers",
- name: "Careers",
- },
- {
- href: "/contact",
- name: "Contact",
- },
- ],
- },
- {
- label: "Resources",
- items: [
- {
- href: "/docs",
- name: "Documentation",
- },
- {
- href: "/api",
- name: "API Reference",
- },
- {
- href: "/community",
- name: "Community",
- },
- ],
- },
- {
- label: "Legal",
- items: [
- {
- href: "/privacy",
- name: "Privacy Policy",
- },
- {
- href: "/terms",
- name: "Terms of Service",
- },
- ],
- },
-];
-
-const footerSocials = [
- {
- href: "/",
- name: "Linkedin",
- icon: <LinkedInLogoIcon className="size-4" />,
- },
- {
- href: "/",
- name: "Twitter",
- icon: <Icons.twitter className="size-4" />,
- },
-];
-
-export default function Footer() {
- return (
- <footer className="border-t">
- <div className="mx-auto w-full max-w-screen-xl px-4">
- <div className="gap-4 p-4 py-16 sm:pb-16 md:flex md:justify-between">
- <div className="mb-12 flex flex-col gap-4">
- <a href="/" className="flex items-center gap-2">
- <HeartHandshake className="size-8 text-primary" />
- <span className="self-center whitespace-nowrap text-2xl font-semibold dark:text-white">
- Magic UI
- </span>
- </a>
- <div className="max-w-sm">
- <div className="z-10 mt-4 flex w-full flex-col items-start text-left">
- <h1 className="text-3xl font-bold lg:text-2xl">
- Get started today.
- </h1>
- <p className="mt-2">
- Start your 7-day free trial. No credit card required.
- </p>
- <a
- href="/signup"
- className={cn(
- buttonVariants({
- size: "lg",
- variant: "default",
- }),
- "group mt-4 w-full rounded-[2rem] px-6",
- )}
- >
- Sign Up Free
- <ChevronRight className="ml-1 size-4 transition-all duration-300 ease-out group-hover:translate-x-1" />
- </a>
- </div>
- </div>
- </div>
- <div className="grid grid-cols-1 gap-8 sm:grid-cols-4 sm:gap-6">
- {footerNavs.map((nav) => (
- <div key={nav.label}>
- <h2 className="mb-6 text-sm font-semibold uppercase text-gray-900 dark:text-white">
- {nav.label}
- </h2>
- <ul className="grid gap-2">
- {nav.items.map((item) => (
- <li key={item.name}>
- <a
- // href={item.href}
- href="/"
- className="group inline-flex cursor-pointer items-center justify-start gap-1 text-gray-400 duration-200 hover:text-black hover:opacity-90"
- >
- {item.name}
- <ChevronRight className="h-4 w-4 translate-x-0 transform opacity-0 transition-all duration-300 ease-out group-hover:translate-x-1 group-hover:opacity-100" />
- </a>
- </li>
- ))}
- </ul>
- </div>
- ))}
- </div>
- </div>
-
- <div className="flex flex-col gap-2 border-t py-4 sm:flex sm:flex-row sm:items-center sm:justify-between">
- <div className="flex space-x-5 sm:mt-0 sm:justify-center">
- {footerSocials.map((social) => (
- <a
- key={social.name}
- href={social.href}
- className="fill-gray-500 text-gray-500 hover:fill-gray-900 hover:text-gray-900 dark:hover:fill-gray-600 dark:hover:text-gray-600"
- >
- {social.icon}
- <span className="sr-only">{social.name}</span>
- </a>
- ))}
- </div>
- <span className="text-sm text-gray-500 dark:text-gray-400 sm:text-center">
- Copyright © {new Date().getFullYear()}{" "}
- <a href="/" className="cursor-pointer">
- Magic UI
- </a>
- . All Rights Reserved.
- </span>
- </div>
- </div>
- </footer>
- );
-}
diff --git a/registry/blocks/example/header-1.tsx b/registry/blocks/example/header-1.tsx
deleted file mode 100644
index 19d4aeb0..00000000
--- a/registry/blocks/example/header-1.tsx
+++ /dev/null
@@ -1,149 +0,0 @@
-"use client";
-
-import { cn } from "@/lib/utils";
-import { AnimatePresence, motion } from "framer-motion";
-import { useTheme } from "next-themes";
-import { useEffect, useRef, useState } from "react";
-
-const SCROLL_BOUNDARY = 120;
-
-export default function StickyHeader() {
- const [scrollY, setScrollY] = useState(0);
- const fixedNavRef = useRef<HTMLElement>(null);
-
- const { theme } = useTheme();
-
- const getBreakpoint = (width: number) => {
- if (width < 640) return "xs";
- if (width < 768) return "sm";
- if (width < 1024) return "md";
- if (width < 1280) return "lg";
- if (width < 1536) return "xl";
- return "2xl";
- };
-
- const [breakpoint, setBreakpoint] = useState("xl"); // Default to 'xl' or any other default value
-
- useEffect(() => {
- // This function will only run in the client-side environment
- const handleResize = () => {
- setBreakpoint(getBreakpoint(window.innerWidth));
- };
-
- // Set the initial value when the component mounts
- handleResize();
-
- // Optionally, update the breakpoint on window resize
- window.addEventListener("resize", handleResize);
-
- // Cleanup the event listener when the component unmounts
- return () => window.removeEventListener("resize", handleResize);
- }, []); // Empty dependency array ensures this effect runs only once on mount
-
- const active =
- scrollY >= SCROLL_BOUNDARY ||
- breakpoint === "xs" ||
- breakpoint === "sm" ||
- breakpoint === "md";
-
- useEffect(() => {
- const handleScroll = () => {
- setScrollY(window.scrollY);
- };
-
- window.addEventListener("scroll", handleScroll);
-
- return () => {
- window.removeEventListener("scroll", handleScroll);
- };
- }, []);
-
- return (
- <header
- ref={fixedNavRef}
- className="mx-auto flex w-full max-w-5xl items-center justify-between bg-transparent px-10 py-7 dark:bg-transparent"
- >
- <div className="hidden flex-row items-center justify-center gap-2 lg:flex">
- <a href="#" className="flex h-8 w-8">
- <img src="/icon.png" className="h-full w-full" />
- </a>
- <a href="#">Magic UI</a>
- </div>
- {/* <h1 className="hidden lg:flex">Logo</h1> */}
- <div className="fixed inset-x-0 top-6 z-50 flex items-center justify-center">
- <motion.div
- initial={{ x: 0 }}
- animate={{
- boxShadow: active
- ? theme === "dark"
- ? "0 0 0 1px rgba(255,255,255,.08), 0 1px 2px -1px rgba(255,255,255,.08), 0 2px 4px rgba(255,255,255,.04)"
- : "0 0 0 1px rgba(17,24,28,.08), 0 1px 2px -1px rgba(17,24,28,.08), 0 2px 4px rgba(17,24,28,.04)"
- : "none",
- }}
- transition={{
- ease: "linear",
- duration: 0.05,
- delay: 0.05,
- }}
- className={cn(
- "supports-backdrop-blur:bg-white/90 mx-4 flex w-full items-center justify-center overflow-hidden rounded-full bg-white bg-white/40 px-3 py-2.5 backdrop-blur-md transition-all dark:bg-black/20 lg:w-auto lg:p-1.5 lg:py-2",
- )}
- >
- <ul className="flex h-full w-full flex-row justify-between gap-6 lg:flex-row lg:justify-start lg:gap-1">
- <li className="flex items-center justify-center px-2 py-0.5">
- <a href="#" className="flex h-8 w-8 lg:hidden">
- <img src="/icon.png" className="h-full w-full" />
- </a>
- <a href="#" className="hidden lg:flex">
- Home
- </a>
- </li>
- <li className="hidden items-center justify-center px-2 py-0.5 lg:flex">
- <a href="#">Features</a>
- </li>
- <li className="hidden items-center justify-center px-2 py-0.5 lg:flex">
- <a href="#">Pricing</a>
- </li>
- <li className="hidden items-center justify-center px-2 py-0.5 lg:flex">
- <a href="#">Contact</a>
- </li>
- <AnimatePresence>
- <motion.div
- initial={{ width: 0 }}
- animate={{
- width: active ? "auto" : 0,
- }}
- transition={{
- ease: "easeOut",
- duration: 0.25,
- delay: 0.05,
- }}
- >
- <AnimatePresence>
- {active && (
- <motion.a
- initial={{ x: "125%" }}
- animate={{ x: "0" }}
- exit={{
- x: "125%",
- transition: { ease: "easeOut", duration: 2.2 },
- }}
- transition={{ ease: "easeOut", duration: 0.5 }}
- className="relative inline-flex w-fit shrink-0 items-center justify-center gap-x-1.5 overflow-hidden whitespace-nowrap rounded-full bg-neutral-900 px-3 py-1.5 text-white outline-none dark:bg-white dark:text-black"
- >
- Get Started
- </motion.a>
- )}
- </AnimatePresence>
- </motion.div>
- </AnimatePresence>
- </ul>
- </motion.div>
- </div>
-
- <a className="relative hidden w-fit items-center justify-center gap-x-1.5 overflow-hidden rounded-full bg-neutral-900 px-3 py-1.5 text-white outline-none dark:bg-white dark:text-black lg:inline-flex">
- Get Started
- </a>
- </header>
- );
-}
diff --git a/registry/blocks/example/header-2.tsx b/registry/blocks/example/header-2.tsx
deleted file mode 100644
index e8a066a2..00000000
--- a/registry/blocks/example/header-2.tsx
+++ /dev/null
@@ -1,180 +0,0 @@
-import { Icons } from "@/components/icons";
-import { buttonVariants } from "@/components/ui/button";
-import { cn } from "@/lib/utils";
-import { LinkedInLogoIcon } from "@radix-ui/react-icons";
-import { ChevronRight, HeartHandshake } from "lucide-react";
-
-const footerNavs = [
- {
- label: "Product",
- items: [
- {
- href: "/features",
- name: "Features",
- },
- {
- href: "/pricing",
- name: "Pricing",
- },
- {
- href: "/faq",
- name: "FAQ",
- },
- {
- href: "mailto:[email protected]",
- name: "Support",
- },
- ],
- },
- {
- label: "Company",
- items: [
- {
- href: "/about",
- name: "About Us",
- },
- {
- href: "/blog",
- name: "Blog",
- },
- {
- href: "/careers",
- name: "Careers",
- },
- {
- href: "/contact",
- name: "Contact",
- },
- ],
- },
- {
- label: "Resources",
- items: [
- {
- href: "/docs",
- name: "Documentation",
- },
- {
- href: "/api",
- name: "API Reference",
- },
- {
- href: "/community",
- name: "Community",
- },
- ],
- },
- {
- label: "Legal",
- items: [
- {
- href: "/privacy",
- name: "Privacy Policy",
- },
- {
- href: "/terms",
- name: "Terms of Service",
- },
- ],
- },
-];
-
-const footerSocials = [
- {
- href: "/",
- name: "Linkedin",
- icon: <LinkedInLogoIcon className="size-4" />,
- },
- {
- href: "/",
- name: "Twitter",
- icon: <Icons.twitter className="size-4" />,
- },
-];
-
-export default function Footer() {
- return (
- <footer className="border-t">
- <div className="mx-auto w-full max-w-screen-xl px-4">
- <div className="gap-4 p-4 py-16 sm:pb-16 md:flex md:justify-between">
- <div className="mb-12 flex flex-col gap-4">
- <a href="/" className="flex items-center gap-2">
- <HeartHandshake className="size-8 text-primary" />
- <span className="self-center whitespace-nowrap text-2xl font-semibold dark:text-white">
- Magic UI
- </span>
- </a>
- <div className="max-w-sm">
- <div className="z-10 mt-4 flex w-full flex-col items-start text-left">
- <h1 className="text-3xl font-bold lg:text-2xl">
- Get started today.
- </h1>
- <p className="mt-2">
- Start your 7-day free trial. No credit card required.
- </p>
- <a
- href="/signup"
- className={cn(
- buttonVariants({
- size: "lg",
- variant: "default",
- }),
- "group mt-4 w-full rounded-[2rem] px-6",
- )}
- >
- Sign Up Free
- <ChevronRight className="ml-1 size-4 transition-all duration-300 ease-out group-hover:translate-x-1" />
- </a>
- </div>
- </div>
- </div>
- <div className="grid grid-cols-1 gap-8 sm:grid-cols-4 sm:gap-6">
- {footerNavs.map((nav) => (
- <div key={nav.label}>
- <h2 className="mb-6 text-sm font-semibold uppercase text-gray-900 dark:text-white">
- {nav.label}
- </h2>
- <ul className="grid gap-2">
- {nav.items.map((item) => (
- <li key={item.name}>
- <a
- // href={item.href}
- href="/"
- className="group inline-flex cursor-pointer items-center justify-start gap-1 text-gray-400 duration-200 hover:text-black hover:opacity-90"
- >
- {item.name}
- <ChevronRight className="h-4 w-4 translate-x-0 transform opacity-0 transition-all duration-300 ease-out group-hover:translate-x-1 group-hover:opacity-100" />
- </a>
- </li>
- ))}
- </ul>
- </div>
- ))}
- </div>
- </div>
-
- <div className="flex flex-col gap-2 border-t py-4 sm:flex sm:flex-row sm:items-center sm:justify-between">
- <div className="flex space-x-5 sm:mt-0 sm:justify-center">
- {footerSocials.map((social) => (
- <a
- key={social.name}
- href={social.href}
- className="fill-gray-500 text-gray-500 hover:fill-gray-900 hover:text-gray-900 dark:hover:fill-gray-600 dark:hover:text-gray-600"
- >
- {social.icon}
- <span className="sr-only">{social.name}</span>
- </a>
- ))}
- </div>
- <span className="text-sm text-gray-500 dark:text-gray-400 sm:text-center">
- Copyright © {new Date().getFullYear()}{" "}
- <a href="/" className="cursor-pointer">
- Magic UI
- </a>
- . All Rights Reserved.
- </span>
- </div>
- </div>
- </footer>
- );
-}
diff --git a/registry/blocks/example/hero-1.tsx b/registry/blocks/example/hero-1.tsx
deleted file mode 100644
index c42991ea..00000000
--- a/registry/blocks/example/hero-1.tsx
+++ /dev/null
@@ -1,143 +0,0 @@
-"use client";
-
-import { cn } from "@/lib/utils";
-import { BorderBeam } from "@/registry/components/magicui/border-beam";
-import { motion, useInView } from "framer-motion";
-import { ChevronRight } from "lucide-react";
-import { useRef } from "react";
-
-export default function Hero() {
- const fadeInRef = useRef(null);
- const fadeInInView = useInView(fadeInRef, {
- once: true,
- });
-
- const fadeUpVariants = {
- initial: {
- opacity: 0,
- y: 24,
- },
- animate: {
- opacity: 1,
- y: 0,
- },
- };
-
- return (
- <section id="hero">
- <div className="relative h-full overflow-hidden py-14">
- <div className="container z-10 flex flex-col">
- <div className="mt-20 grid grid-cols-1">
- <div className="flex flex-col items-center gap-6 pb-8 text-center">
- <motion.h1
- ref={fadeInRef}
- className="text-balance bg-gradient-to-br from-black from-30% to-black/60 bg-clip-text py-6 text-5xl font-medium leading-none tracking-tighter text-transparent dark:from-white dark:to-white/40 sm:text-6xl md:text-7xl lg:text-8xl"
- animate={fadeInInView ? "animate" : "initial"}
- variants={fadeUpVariants}
- initial={false}
- transition={{
- duration: 0.6,
- delay: 0.1,
- ease: [0.21, 0.47, 0.32, 0.98],
- type: "spring",
- }}
- >
- Create Magical <br /> Landing Pages <br />
- </motion.h1>
-
- <motion.p
- className="text-balance text-lg tracking-tight text-gray-400 md:text-xl"
- animate={fadeInInView ? "animate" : "initial"}
- variants={fadeUpVariants}
- initial={false}
- transition={{
- duration: 0.6,
- delay: 0.2,
- ease: [0.21, 0.47, 0.32, 0.98],
- type: "spring",
- }}
- >
- Magic UI is a curated collection of React + Tailwind CSS +
- Framer Motion components
- </motion.p>
-
- <motion.div
- animate={fadeInInView ? "animate" : "initial"}
- variants={fadeUpVariants}
- className="flex flex-col gap-4 lg:flex-row"
- initial={false}
- transition={{
- duration: 0.6,
- delay: 0.3,
- ease: [0.21, 0.47, 0.32, 0.98],
- type: "spring",
- }}
- >
- <a
- href="#"
- className={cn(
- // colors
- "bg-black text-white shadow hover:bg-black/90 dark:bg-white dark:text-black dark:hover:bg-white/90",
-
- // layout
- "group relative inline-flex h-9 w-full items-center justify-center gap-2 overflow-hidden whitespace-pre rounded-md px-4 py-2 text-base font-semibold tracking-tighter focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 md:flex",
-
- // animation
- "transform-gpu ring-offset-current transition-all duration-300 ease-out hover:ring-2 hover:ring-primary hover:ring-offset-2",
- )}
- >
- Get Started
- <ChevronRight className="size-4 translate-x-0 transition-all duration-300 ease-out group-hover:translate-x-1" />
- </a>
- </motion.div>
- </div>
- </div>
-
- <motion.div
- animate={fadeInInView ? "animate" : "initial"}
- variants={fadeUpVariants}
- initial={false}
- transition={{
- duration: 1.4,
- delay: 0.4,
- ease: [0.21, 0.47, 0.32, 0.98],
- type: "spring",
- }}
- className="relative mt-24 h-full w-full rounded-xl after:absolute after:inset-0 after:z-10 after:[background:linear-gradient(to_top,#fff_30%,transparent)] dark:after:[background:linear-gradient(to_top,#000000_30%,transparent)]"
- >
- <div
- className={cn(
- "absolute inset-0 bottom-1/2 h-full w-full transform-gpu [filter:blur(120px)]",
-
- // light styles
- "[background-image:linear-gradient(to_bottom,#ffaa40,transparent_30%)]",
-
- // dark styles
- "dark:[background-image:linear-gradient(to_bottom,#ffffff,transparent_30%)]",
- )}
- />
-
- <img
- src="/dashboard-light.png"
- className="relative block h-full w-full rounded-xl border dark:hidden"
- />
- <img
- src="/dashboard-dark.png"
- className="relative hidden h-full w-full rounded-xl border dark:block"
- />
- {/* <video
- autoPlay
- loop
- muted
- src="demo.mp4"
- className="h-auto w-full"
- /> */}
-
- <BorderBeam size={150} />
- <BorderBeam size={150} delay={7} />
- </motion.div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/hero-2.tsx b/registry/blocks/example/hero-2.tsx
deleted file mode 100644
index 8343cca1..00000000
--- a/registry/blocks/example/hero-2.tsx
+++ /dev/null
@@ -1,142 +0,0 @@
-"use client";
-
-import { cn } from "@/lib/utils";
-import { BorderBeam } from "@/registry/components/magicui/border-beam";
-import RetroGrid from "@/registry/components/magicui/retro-grid";
-import { motion, useInView } from "framer-motion";
-import { ChevronRight } from "lucide-react";
-import { useRef } from "react";
-
-export default function Hero() {
- const fadeInRef = useRef(null);
- const fadeInInView = useInView(fadeInRef, {
- once: true,
- });
-
- const fadeUpVariants = {
- initial: {
- opacity: 0,
- y: 24,
- },
- animate: {
- opacity: 1,
- y: 0,
- },
- };
-
- return (
- <section id="hero">
- <div className="relative h-full overflow-hidden py-14">
- <RetroGrid className="z-0" />
- <div className="container z-10 flex flex-col">
- <div className="mt-20 grid grid-cols-1">
- <div className="flex flex-col items-center gap-6 pb-8 text-center">
- <motion.h1
- ref={fadeInRef}
- className="text-balance bg-gradient-to-br from-black from-30% to-black/60 bg-clip-text py-6 text-5xl font-medium leading-none tracking-tighter text-transparent dark:from-white dark:to-white/40 sm:text-6xl md:text-7xl lg:text-8xl"
- animate={fadeInInView ? "animate" : "initial"}
- variants={fadeUpVariants}
- initial={false}
- transition={{
- duration: 0.6,
- delay: 0.1,
- ease: [0.21, 0.47, 0.32, 0.98],
- type: "spring",
- }}
- >
- Create Magical <br /> Landing Pages <br />
- </motion.h1>
-
- <motion.p
- className="text-balance text-lg tracking-tight text-gray-400 md:text-xl"
- animate={fadeInInView ? "animate" : "initial"}
- variants={fadeUpVariants}
- initial={false}
- transition={{
- duration: 0.6,
- delay: 0.2,
- ease: [0.21, 0.47, 0.32, 0.98],
- type: "spring",
- }}
- >
- Magic UI is a curated collection of React + Tailwind CSS +
- Framer Motion components
- </motion.p>
-
- <motion.div
- animate={fadeInInView ? "animate" : "initial"}
- variants={fadeUpVariants}
- className="flex flex-col gap-4 lg:flex-row"
- initial={false}
- transition={{
- duration: 0.6,
- delay: 0.3,
- ease: [0.21, 0.47, 0.32, 0.98],
- type: "spring",
- }}
- >
- <a
- href="#"
- className={cn(
- // colors
- "bg-black text-white shadow hover:bg-black/90 dark:bg-white dark:text-black dark:hover:bg-white/90",
-
- // layout
- "group relative inline-flex h-9 w-full items-center justify-center gap-2 overflow-hidden whitespace-pre rounded-md px-4 py-2 text-base font-semibold tracking-tighter focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 md:flex",
-
- // animation
- "transform-gpu ring-offset-current transition-all duration-300 ease-out hover:ring-2 hover:ring-primary hover:ring-offset-2",
- )}
- >
- Get Started
- <ChevronRight className="size-4 translate-x-0 transition-all duration-300 ease-out group-hover:translate-x-1" />
- </a>
- </motion.div>
- </div>
- </div>
-
- <motion.div
- animate={fadeInInView ? "animate" : "initial"}
- variants={fadeUpVariants}
- initial={false}
- transition={{
- duration: 0.6,
- delay: 0.4,
- ease: [0.21, 0.47, 0.32, 0.98],
- type: "spring",
- }}
- className="relative mx-auto mt-24 h-full w-full max-w-[768px] rounded-xl border shadow-2xl"
- >
- <div
- className={cn(
- "absolute inset-0 bottom-1/2 h-full w-full transform-gpu [filter:blur(120px)]",
-
- // light styles
- "[background-image:linear-gradient(to_bottom,#ffaa40,transparent_30%)]",
-
- // dark styles
- "dark:[background-image:linear-gradient(to_bottom,#ffffff,transparent_30%)]",
- )}
- />
- {/* <video
- autoPlay
- loop
- muted
- src="demo.mp4"
- className="h-auto w-full"
- /> */}
- <img
- src="/dashboard-light.png"
- className="relative block h-full w-full rounded-xl dark:hidden"
- />
- <img
- src="/dashboard-dark.png"
- className="relative hidden h-full w-full rounded-xl dark:block"
- />
- <BorderBeam />
- </motion.div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/hero-WIP.tsx b/registry/blocks/example/hero-WIP.tsx
deleted file mode 100644
index da5d348a..00000000
--- a/registry/blocks/example/hero-WIP.tsx
+++ /dev/null
@@ -1,241 +0,0 @@
-// "use client";
-
-// import { buttonVariants } from "@/components/ui/button";
-// import assets from "@/config/assets.json";
-// import { cn } from "@/lib/utils";
-// import FadeIn from "@/registry/components/magicui/fade-in";
-// import { motion } from "framer-motion";
-// import { ChevronRight } from "lucide-react";
-// import Link from "next/link";
-// import { useCallback, useEffect, useMemo, useState } from "react";
-
-// export type Breakpoint = "xs" | "sm" | "md" | "lg";
-
-// interface Breakpoints {
-// [key: string]: number;
-// }
-
-// const BREAKPOINTS: Breakpoints = {
-// xs: 640,
-// sm: 768,
-// md: 1024,
-// lg: 1280,
-// };
-
-// const useBreakpoint = (): Breakpoint => {
-// const [breakpoint, setBreakpoint] = useState<Breakpoint>("sm");
-
-// const getBreakpoint = useCallback((): Breakpoint => {
-// const width = window.innerWidth;
-// if (width < BREAKPOINTS.sm) {
-// return "xs";
-// } else if (width < BREAKPOINTS.md) {
-// return "sm";
-// } else if (width < BREAKPOINTS.lg) {
-// return "md";
-// } else {
-// return "lg";
-// }
-// }, []);
-
-// useEffect(() => {
-// const handleResize = () => {
-// setBreakpoint(getBreakpoint());
-// };
-
-// window.addEventListener("resize", handleResize);
-// handleResize(); // Call the function on page load
-
-// return () => {
-// window.removeEventListener("resize", handleResize);
-// };
-// }, [getBreakpoint]);
-
-// return breakpoint;
-// };
-
-// // export default useBreakpoint;
-
-// const OFFSET_BY = 80;
-
-// const ROWS: Record<Breakpoint, number> = {
-// xs: 4,
-// sm: 3,
-// md: 3,
-// lg: 3,
-// };
-
-// const COLUMNS: Record<Breakpoint, number> = {
-// xs: 5,
-// sm: 7,
-// md: 7,
-// lg: 7,
-// };
-
-// const SIZES: Record<Breakpoint, number> = {
-// xs: 64,
-// sm: 64,
-// md: 96,
-// lg: 96,
-// };
-
-// export default function Hero() {
-// const breakpoint: Breakpoint = useBreakpoint();
-// const [size, setSize] = useState(SIZES[breakpoint]);
-// const [totalColumns, setTotalColumns] = useState(COLUMNS[breakpoint]);
-// const [totalRows, setTotalRows] = useState(ROWS[breakpoint]);
-
-// const headshots = useMemo(() => {
-// const remainder = assets.headshots.length % totalColumns;
-// return remainder === 0
-// ? assets.headshots
-// : assets.headshots.slice(0, assets.headshots.length - remainder);
-// }, [totalColumns]);
-
-// useEffect(() => {
-// const handleResize = () => {
-// setTotalColumns(COLUMNS[breakpoint]);
-// setTotalRows(ROWS[breakpoint]);
-// setSize(SIZES[breakpoint]);
-// };
-
-// window.addEventListener("resize", handleResize);
-// handleResize(); // Call the function on page load
-
-// return () => {
-// window.removeEventListener("resize", handleResize);
-// };
-// }, [breakpoint]);
-
-// return (
-// <section id="hero">
-// <div className="relative h-full overflow-hidden py-14">
-// <div className="container flex flex-col ">
-// <div
-// style={
-// {
-// "--size": `${size}px`,
-// "--columns": `${totalColumns}`,
-// "--rows": `${totalRows}`,
-// } as React.CSSProperties
-// }
-// className={cn(
-// "grid place-items-center justify-center",
-// {
-// [`-mt-48 grid-cols-[repeat(var(--columns),var(--size))] grid-rows-[repeat(var(--rows),var(--size))] gap-2`]:
-// totalColumns === COLUMNS.xs,
-// },
-// {
-// [`md:-mt-20 md:grid-cols-[repeat(var(--columns),var(--size))] md:grid-rows-[repeat(var(--rows),var(--size))] md:gap-4`]:
-// totalColumns === COLUMNS.sm ||
-// totalColumns === COLUMNS.md ||
-// totalColumns === COLUMNS.lg,
-// },
-// )}
-// >
-// {headshots.map((logo, idx) => {
-// const column = idx % totalColumns;
-// const row = Math.floor(idx / totalColumns);
-// const totalRows = Math.ceil(headshots.length / totalColumns);
-// const bottomMiddleColumn = Math.floor(totalColumns / 2);
-// const bottomMiddleRow = totalRows - 1;
-// const offset = -Math.abs(bottomMiddleColumn - column) * OFFSET_BY;
-
-// // Calculate delay based on distance from the bottom middle
-// const distanceFromBottomMiddle = Math.sqrt(
-// Math.pow(bottomMiddleColumn - column, 2) +
-// Math.pow(bottomMiddleRow - row, 2),
-// );
-
-// // Calculate maximum possible distance
-// const maxDistance = Math.sqrt(
-// Math.pow(totalColumns - 1, 2) + Math.pow(totalRows - 1, 2),
-// );
-
-// // Invert the delay
-// const delay = (maxDistance - distanceFromBottomMiddle) * 0.15;
-
-// return (
-// <motion.img
-// key={idx}
-// initial={{ opacity: 0, y: -20 }}
-// animate={{ opacity: 1, y: 0 }}
-// transition={{
-// opacity: {
-// delay,
-// ease: [0.16, 1, 0.3, 1],
-// duration: 1.7,
-// },
-// y: {
-// delay,
-// duration: 6.5,
-// ease: [0.16, 1, 0.3, 1],
-// },
-// }}
-// width={size}
-// height={size}
-// src={`/assets/headshots/${logo}`}
-// style={
-// {
-// "--offset": `${offset}px`,
-// } as React.CSSProperties
-// }
-// className={`mt-[var(--offset)] rounded-2xl shadow-2xl`}
-// alt={`logo-${logo}`}
-// />
-// );
-// })}
-// </div>
-
-// <div className="mt-20 grid grid-cols-1">
-// <div className="flex flex-col items-center gap-6 pb-8 text-center">
-// <FadeIn delay={0.1}>
-// <h1 className="text-5xl font-bold tracking-tighter sm:text-6xl md:text-7xl lg:text-7xl">
-// Professional AI Headshots
-// </h1>
-// </FadeIn>
-// <FadeIn delay={0.1}>
-// <p className="text-sm leading-normal text-muted-foreground sm:text-xl">
-// Generate AI headshots in minutes.
-// </p>
-// </FadeIn>
-// <FadeIn delay={0.2} className="flex flex-col gap-4 lg:flex-row">
-// <Link
-// href="/login"
-// className={cn(
-// buttonVariants({
-// size: "lg",
-// }),
-// "gap-2 whitespace-pre md:flex",
-// "group relative w-full gap-1 overflow-hidden text-base font-semibold tracking-tighter",
-// "transform-gpu ring-offset-current transition-all duration-300 ease-out hover:ring-2 hover:ring-primary hover:ring-offset-2",
-// )}
-// >
-// Get Started
-// <ChevronRight className="size-4 translate-x-0 transition-all duration-300 ease-out group-hover:translate-x-1" />
-// </Link>
-// </FadeIn>
-// {/* <FadeIn delay={0.3}>
-// <JoinUsers />
-// </FadeIn> */}
-// </div>
-// </div>
-
-// <FadeIn delay={0.4} className="flex">
-// <video
-// autoPlay
-// loop
-// muted
-// src="demo.mp4"
-// className="mt-32 w-full rounded-lg border shadow-2xl"
-// />
-// </FadeIn>
-// </div>
-// {/* <CarouselVertical className="absolute right-20 top-0 hidden 2xl:block" />
-// <CarouselVertical className="absolute left-20 top-0 hidden 2xl:block" /> */}
-// {/* <CarouselHorizontal className="z-10 my-14" />
-// <Confetti className="absolute inset-x-0 bottom-0 -z-10 mx-auto size-[800px]" /> */}
-// </div>
-// </section>
-// );
-// }
diff --git a/registry/blocks/example/pricing-1.tsx b/registry/blocks/example/pricing-1.tsx
deleted file mode 100644
index 22659e5d..00000000
--- a/registry/blocks/example/pricing-1.tsx
+++ /dev/null
@@ -1,217 +0,0 @@
-"use client";
-
-import { Button } from "@/components/ui/button";
-import { Switch } from "@/components/ui/switch";
-import { cn } from "@/lib/utils";
-import { CheckIcon } from "@radix-ui/react-icons";
-import { motion } from "framer-motion";
-import { Loader } from "lucide-react";
-import { useState } from "react";
-
-type Interval = "month" | "year";
-
-export const toHumanPrice = (price: number, decimals: number = 2) => {
- return Number(price / 100).toFixed(decimals);
-};
-const demoPrices = [
- {
- id: "price_1",
- name: "Basic",
- description: "A basic plan for startups and individual users",
- features: [
- "AI-powered analytics",
- "Basic support",
- "5 projects limit",
- "Access to basic AI tools",
- ],
- monthlyPrice: 1000,
- yearlyPrice: 10000,
- isMostPopular: false,
- },
- {
- id: "price_2",
- name: "Premium",
- description: "A premium plan for growing businesses",
- features: [
- "Advanced AI insights",
- "Priority support",
- "Unlimited projects",
- "Access to all AI tools",
- "Custom integrations",
- ],
- monthlyPrice: 2000,
- yearlyPrice: 20000,
- isMostPopular: true,
- },
- {
- id: "price_5",
- name: "Enterprise",
- description:
- "An enterprise plan with advanced features for large organizations",
- features: [
- "Custom AI solutions",
- "24/7 dedicated support",
- "Unlimited projects",
- "Access to all AI tools",
- "Custom integrations",
- "Data security and compliance",
- ],
- monthlyPrice: 5000,
- yearlyPrice: 50000,
- isMostPopular: false,
- },
- {
- id: "price_6",
- name: "Ultimate",
- description: "The ultimate plan with all features for industry leaders",
- features: [
- "Bespoke AI development",
- "White-glove support",
- "Unlimited projects",
- "Priority access to new AI tools",
- "Custom integrations",
- "Highest data security and compliance",
- ],
- monthlyPrice: 8000,
- yearlyPrice: 80000,
- isMostPopular: false,
- },
-];
-
-export default function Pricing() {
- const [interval, setInterval] = useState<Interval>("month");
- const [isLoading, setIsLoading] = useState(false);
- const [id, setId] = useState<string | null>(null);
-
- const onSubscribeClick = async (priceId: string) => {
- setIsLoading(true);
- setId(priceId);
- await new Promise((resolve) => setTimeout(resolve, 1000)); // Simulate a delay
- setIsLoading(false);
- };
-
- return (
- <section id="pricing">
- <div className="mx-auto flex max-w-screen-xl flex-col gap-8 px-4 py-14 md:px-8">
- <div className="mx-auto max-w-5xl text-center">
- <h4 className="text-xl font-bold tracking-tight text-black dark:text-white">
- Pricing
- </h4>
-
- <h2 className="text-5xl font-bold tracking-tight text-black dark:text-white sm:text-6xl">
- Simple pricing for everyone.
- </h2>
-
- <p className="mt-6 text-xl leading-8 text-black/80 dark:text-white">
- Choose an <strong>affordable plan</strong> that&apos;s packed with
- the best features for engaging your audience, creating customer
- loyalty, and driving sales.
- </p>
- </div>
-
- <div className="flex w-full items-center justify-center space-x-2">
- <Switch
- id="interval"
- onCheckedChange={(checked) => {
- setInterval(checked ? "year" : "month");
- }}
- />
- <span>Annual</span>
- <span className="inline-block whitespace-nowrap rounded-full bg-black px-2.5 py-1 text-[11px] font-semibold uppercase leading-5 tracking-wide text-white dark:bg-white dark:text-black">
- 2 MONTHS FREE ✨
- </span>
- </div>
-
- <div className="mx-auto grid w-full justify-center gap-8 sm:grid-cols-2 lg:grid-cols-4">
- {demoPrices.map((price, idx) => (
- <div
- key={price.id}
- className={cn(
- " relative flex w-full max-w-[400px] flex-col gap-4 overflow-hidden rounded-2xl border p-4 text-black dark:text-white",
- {
- "border-2 border-neutral-700 shadow-lg shadow-neutral-500 dark:border-neutral-400 dark:shadow-neutral-600":
- price.isMostPopular,
- },
- )}
- >
- <div className="flex items-center">
- <div className="ml-4">
- <h2 className="text-base font-semibold leading-7">
- {price.name}
- </h2>
- <p className="h-16 text-sm leading-5 text-black/70 dark:text-white">
- {price.description}
- </p>
- </div>
- </div>
-
- <motion.div
- key={`${price.id}-${interval}`}
- initial="initial"
- animate="animate"
- variants={{
- initial: {
- opacity: 0,
- y: 12,
- },
- animate: {
- opacity: 1,
- y: 0,
- },
- }}
- transition={{
- duration: 0.4,
- delay: 0.1 + idx * 0.05,
- ease: [0.21, 0.47, 0.32, 0.98],
- }}
- className="flex flex-row gap-1"
- >
- <span className="text-4xl font-bold text-black dark:text-white">
- $
- {interval === "year"
- ? toHumanPrice(price.yearlyPrice, 0)
- : toHumanPrice(price.monthlyPrice, 0)}
- <span className="text-xs"> / {interval}</span>
- </span>
- </motion.div>
-
- <Button
- className={cn(
- "group relative w-full gap-2 overflow-hidden text-lg font-semibold tracking-tighter",
- "transform-gpu ring-offset-current transition-all duration-300 ease-out hover:ring-2 hover:ring-primary hover:ring-offset-2",
- )}
- disabled={isLoading}
- onClick={() => void onSubscribeClick(price.id)}
- >
- <span className="absolute right-0 -mt-12 h-32 w-8 translate-x-12 rotate-12 transform-gpu bg-white opacity-10 transition-all duration-1000 ease-out group-hover:-translate-x-96 dark:bg-black" />
- {(!isLoading || (isLoading && id !== price.id)) && (
- <p>Subscribe</p>
- )}
-
- {isLoading && id === price.id && <p>Subscribing</p>}
- {isLoading && id === price.id && (
- <Loader className="mr-2 h-4 w-4 animate-spin" />
- )}
- </Button>
-
- <hr className="m-0 h-px w-full border-none bg-gradient-to-r from-neutral-200/0 via-neutral-500/30 to-neutral-200/0" />
- {price.features && price.features.length > 0 && (
- <ul className="flex flex-col gap-2 font-normal">
- {price.features.map((feature: any, idx: any) => (
- <li
- key={idx}
- className="flex items-center gap-3 text-xs font-medium text-black dark:text-white"
- >
- <CheckIcon className="h-5 w-5 shrink-0 rounded-full bg-green-400 p-[2px] text-black dark:text-white" />
- <span className="flex">{feature}</span>
- </li>
- ))}
- </ul>
- )}
- </div>
- ))}
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/pricing-2.tsx b/registry/blocks/example/pricing-2.tsx
deleted file mode 100644
index bc9edbe0..00000000
--- a/registry/blocks/example/pricing-2.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-export default function Pricing() {
- return (
- <section id="pricing">
- <div className="py-14">
- <div className="container mx-auto px-4 md:px-8">
- <h3 className="text-center text-sm font-semibold text-gray-600">
- Pricing
- </h3>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/social-proof-companies-1.tsx b/registry/blocks/example/social-proof-companies-1.tsx
deleted file mode 100644
index 4eaf6754..00000000
--- a/registry/blocks/example/social-proof-companies-1.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-const companies = [
- "Google",
- "Microsoft",
- "Amazon",
- "Netflix",
- "YouTube",
- "Instagram",
- "Uber",
- "Spotify",
-];
-
-export default function Companies() {
- return (
- <section id="companies">
- <div className="py-14">
- <div className="container mx-auto px-4 md:px-8">
- <h3 className="text-center text-sm font-semibold text-gray-500">
- TRUSTED BY LEADING TEAMS
- </h3>
- <div className="relative mt-6">
- <div className="grid grid-cols-2 place-items-center gap-2 md:grid-cols-4 xl:grid-cols-8 xl:gap-4">
- {companies.map((logo, idx) => (
- <img
- key={idx}
- src={`https://cdn.magicui.design/companies/${logo}.svg`}
- className="h-10 w-40 px-2 dark:brightness-0 dark:invert"
- alt={logo}
- />
- ))}
- </div>
- </div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/social-proof-companies-2.tsx b/registry/blocks/example/social-proof-companies-2.tsx
deleted file mode 100644
index 3f7b6bad..00000000
--- a/registry/blocks/example/social-proof-companies-2.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-const companies = [
- "Google",
- "Microsoft",
- "Amazon",
- "Netflix",
- "YouTube",
- "Instagram",
- "Uber",
- "Spotify",
-];
-
-export default function Companies() {
- return (
- <section id="companies">
- <div className="py-14">
- <div className="container mx-auto px-4 md:px-8">
- <h3 className="text-center text-sm font-semibold text-gray-500">
- TRUSTED BY LEADING TEAMS
- </h3>
- <div className="relative mt-6">
- <div className="grid grid-cols-2 place-items-center gap-2 md:grid-cols-4 xl:grid-cols-8 xl:gap-4">
- {companies.map((logo, idx) => (
- <img
- key={idx}
- src={`https://cdn.magicui.design/companies/${logo}.svg`}
- className="h-10 w-40 px-2 dark:brightness-0 dark:invert"
- alt={logo}
- />
- ))}
- </div>
- <div className="pointer-events-none absolute inset-y-0 left-0 h-full w-1/3 bg-gradient-to-r from-white dark:from-black"></div>
- <div className="pointer-events-none absolute inset-y-0 right-0 h-full w-1/3 bg-gradient-to-l from-white dark:from-black"></div>
- </div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/social-proof-companies-3.tsx b/registry/blocks/example/social-proof-companies-3.tsx
deleted file mode 100644
index 8b33b110..00000000
--- a/registry/blocks/example/social-proof-companies-3.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import Marquee from "@/registry/components/magicui/marquee";
-
-const companies = [
- "Google",
- "Microsoft",
- "Amazon",
- "Netflix",
- "YouTube",
- "Instagram",
- "Uber",
- "Spotify",
-];
-
-export default function Companies() {
- return (
- <section id="companies">
- <div className="py-14">
- <div className="container mx-auto px-4 md:px-8">
- <h3 className="text-center text-sm font-semibold text-gray-500">
- TRUSTED BY LEADING TEAMS
- </h3>
- <div className="relative mt-6">
- <Marquee className="max-w-full [--duration:40s]">
- {companies.map((logo, idx) => (
- <img
- key={idx}
- src={`https://cdn.magicui.design/companies/${logo}.svg`}
- className="h-10 w-28 dark:brightness-0 dark:invert"
- alt={logo}
- />
- ))}
- </Marquee>
- <div className="pointer-events-none absolute inset-y-0 left-0 h-full w-1/3 bg-gradient-to-r from-white dark:from-black"></div>
- <div className="pointer-events-none absolute inset-y-0 right-0 h-full w-1/3 bg-gradient-to-l from-white dark:from-black"></div>
- </div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/social-proof-companies-4.tsx b/registry/blocks/example/social-proof-companies-4.tsx
deleted file mode 100644
index 0d1ea871..00000000
--- a/registry/blocks/example/social-proof-companies-4.tsx
+++ /dev/null
@@ -1,116 +0,0 @@
-const companies = [
- "Google",
- "Microsoft",
- "Amazon",
- "Netflix",
- "YouTube",
- "Instagram",
- "Uber",
- "Spotify",
- "Airbnb",
- "Adobe",
- "PayPal",
- "Slack",
- "Whatsapp",
- "GitHub",
- "Dropbox",
- "Tesla",
- "Zoom",
- "Tinder",
- "Shopify",
- "Stripe",
- "Atlassian",
- "Trello",
- "Canva",
- "Figma",
- "Docker",
- "Discord",
- "Evernote",
- "Mailchimp",
- "Hubspot",
- "Asana",
- "Monday.com",
- "Notion",
- "Xero",
- "Zapier",
- "ActiveCampaign",
- "Afterpay",
- "Airtable",
- "Airtasker",
- "Airwallex",
- "Amplitude",
- "Attentive",
- "Automattic",
- "Basecamp",
- "Booking.com",
- "Braze",
- "BrowserStack",
- "Calendly",
- "Carta",
- "Classpass",
- "Clearbit",
- "Codecademy",
- "Coinbase",
- "Contentful",
- "Culture Amp",
- "Customer.io",
- "Databricks",
- "Descript",
- "Drips",
- "Dribbble",
- "Elastic",
- "Freshworks",
- "Ghost",
- "Gong",
- "Grammarly",
- "Gumroad",
- "Gusto",
- "HashiCorp",
- "Hellosign",
- "Himalayas",
- "Hopin",
- "Hotjar",
- "InVision",
- "Intercom",
- "Lattice",
- "LaunchDarkly",
- "Linear",
- "Loom",
- "Maze",
- "Medium",
- "Miro",
- "Monzo",
- "Opendoor",
- "Outreach",
- "Pendo",
- "Pipedrive",
- "Plaid",
- "Postman",
-];
-
-export default function Companies() {
- return (
- <section id="companies">
- <div className="py-14">
- <div className="container mx-auto px-4 md:px-8">
- <h3 className="text-center text-sm font-semibold text-gray-500">
- HELPED PEOPLE FROM COMPANIES LIKE
- </h3>
- <div className="relative mt-6">
- <div className="grid grid-cols-2 place-items-center gap-2 md:grid-cols-4 xl:grid-cols-8 xl:gap-4">
- {companies.map((logo, idx) => (
- <img
- key={idx}
- src={`https://cdn.magicui.design/companies/${logo}.svg`}
- className="h-10 w-40 px-2 dark:brightness-0 dark:invert"
- alt={logo}
- />
- ))}
- </div>
- <div className="pointer-events-none absolute inset-x-0 bottom-0 h-1/2 w-full bg-gradient-to-t from-white from-20% dark:from-black"></div>
- </div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/social-proof-press-1.tsx b/registry/blocks/example/social-proof-press-1.tsx
deleted file mode 100644
index 1203279e..00000000
--- a/registry/blocks/example/social-proof-press-1.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-const press = [
- "TheNewYorkTimes",
- "TheWashingtonPost",
- "Forbes",
- "Bloomberg",
- "BusinessInsider",
- "TechCrunch",
- "TheGuardian",
- "Wired",
-];
-
-export default function Press() {
- return (
- <section id="press">
- <div className="py-14">
- <div className="container mx-auto px-4 md:px-8">
- <h3 className="text-center text-sm font-semibold text-gray-500">
- FEATURED IN
- </h3>
- <div className="relative mt-6">
- <div className="grid grid-cols-2 place-items-center gap-2 md:gap-4 lg:grid-cols-4 xl:gap-x-6 2xl:grid-cols-8">
- {press.map((logo, idx) => (
- <img
- key={idx}
- src={`https://cdn.magicui.design/press/${logo}.svg`}
- className="h-10 w-40 px-2 dark:brightness-0 dark:invert"
- alt={logo}
- />
- ))}
- </div>
- </div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/social-proof-press-2.tsx b/registry/blocks/example/social-proof-press-2.tsx
deleted file mode 100644
index a15b994c..00000000
--- a/registry/blocks/example/social-proof-press-2.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-const press = [
- "TheNewYorkTimes",
- "TheWashingtonPost",
- "Forbes",
- "Bloomberg",
- "BusinessInsider",
- "TechCrunch",
- "TheGuardian",
- "Wired",
-];
-
-export default function Press() {
- return (
- <section id="press">
- <div className="py-14">
- <div className="container mx-auto px-4 md:px-8">
- <h3 className="text-center text-sm font-semibold text-gray-500">
- FEATURED IN
- </h3>
- <div className="relative mt-6">
- <div className="grid grid-cols-2 place-items-center gap-2 md:gap-4 lg:grid-cols-4 xl:gap-x-6 2xl:grid-cols-8">
- {press.map((logo, idx) => (
- <img
- key={idx}
- src={`https://cdn.magicui.design/press/${logo}.svg`}
- className="h-10 w-40 px-2 dark:brightness-0 dark:invert"
- alt={`logo-${logo}`}
- />
- ))}
- </div>
- <div className="pointer-events-none absolute inset-y-0 left-0 h-full w-1/3 bg-gradient-to-r from-white dark:from-black"></div>
- <div className="pointer-events-none absolute inset-y-0 right-0 h-full w-1/3 bg-gradient-to-l from-white dark:from-black"></div>
- </div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/social-proof-press-3.tsx b/registry/blocks/example/social-proof-press-3.tsx
deleted file mode 100644
index 6e7e557e..00000000
--- a/registry/blocks/example/social-proof-press-3.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import Marquee from "@/registry/components/magicui/marquee";
-
-const press = [
- "TheNewYorkTimes",
- "TheWashingtonPost",
- "Forbes",
- "Bloomberg",
- "BusinessInsider",
- "TechCrunch",
- "TheGuardian",
- "Wired",
-];
-
-export default function Press() {
- return (
- <section id="press">
- <div className="py-14">
- <div className="container mx-auto px-4 md:px-8">
- <h3 className="text-center text-sm font-semibold text-gray-500">
- FEATURED IN
- </h3>
- <div className="relative mt-6">
- <Marquee className="max-w-full [--duration:40s]">
- {press.map((logo, idx) => (
- <img
- key={idx}
- src={`https://cdn.magicui.design/press/${logo}.svg`}
- className="h-10 w-40 px-2 dark:brightness-0 dark:invert"
- alt={`logo-${logo}`}
- />
- ))}
- </Marquee>
- <div className="pointer-events-none absolute inset-y-0 left-0 h-full w-1/3 bg-gradient-to-r from-background"></div>
- <div className="pointer-events-none absolute inset-y-0 right-0 h-full w-1/3 bg-gradient-to-l from-background"></div>
- </div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/social-proof-testimonials-1.tsx b/registry/blocks/example/social-proof-testimonials-1.tsx
deleted file mode 100644
index ace5d2bc..00000000
--- a/registry/blocks/example/social-proof-testimonials-1.tsx
+++ /dev/null
@@ -1,167 +0,0 @@
-import { cn } from "@/lib/utils";
-import { StarFilledIcon } from "@radix-ui/react-icons";
-
-export const Highlight = ({
- children,
- className,
-}: {
- children: React.ReactNode;
- className?: string;
-}) => {
- return (
- <span
- className={cn(
- "bg-cyan-600/20 p-1 py-0.5 font-bold text-cyan-600 dark:bg-cyan-600/20 dark:text-cyan-600",
- className,
- )}
- >
- {children}
- </span>
- );
-};
-
-export interface TestimonialCardProps {
- name: string;
- role: string;
- description: React.ReactNode;
- className?: string;
- [key: string]: any;
-}
-
-export const TestimonialCard = ({
- description,
- name,
-
- role,
- className,
- ...props // Capture the rest of the props
-}: TestimonialCardProps) => (
- <div
- className={cn(
- "flex w-72 shrink-0 cursor-pointer snap-center snap-always flex-col justify-between rounded-xl p-4 shadow-xl shadow-black/[0.1] lg:min-w-96",
- // light styles
- " border border-neutral-200 bg-white",
- // dark styles
- "dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]",
- className,
- )}
- {...props} // Spread the rest of the props here
- >
- <div className="select-none font-normal text-neutral-700 dark:text-neutral-400">
- {description}
- </div>
-
- <div className="select-none">
- <div className="flex flex-row py-1">
- <StarFilledIcon className="size-4 text-yellow-500" />
- <StarFilledIcon className="size-4 text-yellow-500" />
- <StarFilledIcon className="size-4 text-yellow-500" />
- <StarFilledIcon className="size-4 text-yellow-500" />
- <StarFilledIcon className="size-4 text-yellow-500" />
- </div>
- <p className="font-medium text-neutral-500">{name}</p>
- <p className="text-sm font-normal text-neutral-400">{role}</p>
- </div>
- </div>
-);
-
-const testimonials = [
- {
- name: "Alex Rivera",
- role: "CTO at InnovateTech",
- description: (
- <p>
- The AI-driven analytics from #QuantumInsights have revolutionized our
- product development cycle.
- <Highlight>
- Insights are now more accurate and faster than ever.
- </Highlight>{" "}
- A game-changer for tech companies.
- </p>
- ),
- },
- {
- name: "Samantha Lee",
- role: "Marketing Director at NextGen Solutions",
- description: (
- <p>
- Implementing #AIStream's customer prediction model has drastically
- improved our targeting strategy.
- <Highlight>Seeing a 50% increase in conversion rates!</Highlight> Highly
- recommend their solutions.
- </p>
- ),
- },
- {
- name: "Raj Patel",
- role: "Founder & CEO at StartUp Grid",
- description: (
- <p>
- As a startup, we need to move fast and stay ahead. #CodeAI's automated
- coding assistant helps us do just that.
- <Highlight>Our development speed has doubled.</Highlight> Essential tool
- for any startup.
- </p>
- ),
- },
- {
- name: "Emily Chen",
- role: "Product Manager at Digital Wave",
- description: (
- <p>
- #VoiceGen's AI-driven voice synthesis has made creating global products
- a breeze.
- <Highlight>Localization is now seamless and efficient.</Highlight> A
- must-have for global product teams.
- </p>
- ),
- },
- {
- name: "Michael Brown",
- role: "Data Scientist at FinTech Innovations",
- description: (
- <p>
- Leveraging #DataCrunch's AI for our financial models has given us an
- edge in predictive accuracy.
- <Highlight>
- Our investment strategies are now powered by real-time data analytics.
- </Highlight>{" "}
- Transformative for the finance industry.
- </p>
- ),
- },
-];
-
-export default function SocialProofTestimonials() {
- return (
- <section id="testimonials">
- <div className="py-14">
- <div className="mx-auto md:container md:px-8">
- <h3 className="text-center text-sm font-semibold text-gray-600">
- TESTIMONIALS
- </h3>
- <div className="relative mx-auto mt-6 max-w-[100vw] overflow-hidden">
- <div
- className={cn(
- "flex w-full snap-x snap-mandatory flex-row gap-6 overflow-x-auto py-14",
-
- // no scrollbar
- "[-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
- )}
- >
- {/* Empty placeholder */}
- <div className="size-72 shrink-0 md:h-60 md:min-w-96"></div>
- {testimonials.map((card, idx) => (
- <TestimonialCard {...card} key={idx} />
- ))}
- {/* Empty placeholder */}
- <div className="size-72 shrink-0 md:h-60 md:min-w-96"></div>
- </div>
- <div className="pointer-events-none absolute inset-y-0 left-0 hidden h-full w-1/5 bg-gradient-to-r from-background md:block"></div>
- <div className="pointer-events-none absolute inset-y-0 right-0 hidden h-full w-1/5 bg-gradient-to-l from-background md:block"></div>
- </div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/social-proof-testimonials-2.tsx b/registry/blocks/example/social-proof-testimonials-2.tsx
deleted file mode 100644
index b8cb2c3a..00000000
--- a/registry/blocks/example/social-proof-testimonials-2.tsx
+++ /dev/null
@@ -1,275 +0,0 @@
-import { cn } from "@/lib/utils";
-import { StarFilledIcon } from "@radix-ui/react-icons";
-
-export const Highlight = ({
- children,
- className,
-}: {
- children: React.ReactNode;
- className?: string;
-}) => {
- return (
- <span
- className={cn(
- "bg-cyan-600/20 p-1 py-0.5 font-bold text-cyan-600 dark:bg-cyan-600/20 dark:text-cyan-600",
- className,
- )}
- >
- {children}
- </span>
- );
-};
-
-export interface TestimonialCardProps {
- name: string;
- role: string;
- img?: string;
- description: React.ReactNode;
- className?: string;
- [key: string]: any;
-}
-
-export const TestimonialCard = ({
- description,
- name,
- img,
- role,
- className,
- ...props // Capture the rest of the props
-}: TestimonialCardProps) => (
- <div
- className={cn(
- "mb-4 flex w-full cursor-pointer break-inside-avoid flex-col items-center justify-between gap-6 rounded-xl p-4",
- // light styles
- " border border-neutral-200 bg-white",
- // dark styles
- "dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]",
- className,
- )}
- {...props} // Spread the rest of the props here
- >
- <div className="select-none text-sm font-normal text-neutral-700 dark:text-neutral-400">
- {description}
- <div className="flex flex-row py-1">
- <StarFilledIcon className="size-4 text-yellow-500" />
- <StarFilledIcon className="size-4 text-yellow-500" />
- <StarFilledIcon className="size-4 text-yellow-500" />
- <StarFilledIcon className="size-4 text-yellow-500" />
- <StarFilledIcon className="size-4 text-yellow-500" />
- </div>
- </div>
-
- <div className="flex w-full select-none items-center justify-start gap-5">
- <img
- src={img}
- className="h-10 w-10 rounded-full ring-1 ring-border ring-offset-4"
- />
-
- <div>
- <p className="font-medium text-neutral-500">{name}</p>
- <p className="text-xs font-normal text-neutral-400">{role}</p>
- </div>
- </div>
- </div>
-);
-
-const testimonials = [
- {
- name: "Alex Rivera",
- role: "CTO at InnovateTech",
- img: "https://randomuser.me/api/portraits/men/91.jpg",
- description: (
- <p>
- The AI-driven analytics from #QuantumInsights have revolutionized our
- product development cycle.
- <Highlight>
- Insights are now more accurate and faster than ever.
- </Highlight>{" "}
- A game-changer for tech companies.
- </p>
- ),
- },
- {
- name: "Samantha Lee",
- role: "Marketing Director at NextGen Solutions",
- img: "https://randomuser.me/api/portraits/women/12.jpg",
- description: (
- <p>
- Implementing #AIStream's customer prediction model has drastically
- improved our targeting strategy.
- <Highlight>Seeing a 50% increase in conversion rates!</Highlight> Highly
- recommend their solutions.
- </p>
- ),
- },
- {
- name: "Raj Patel",
- role: "Founder & CEO at StartUp Grid",
- img: "https://randomuser.me/api/portraits/men/45.jpg",
- description: (
- <p>
- As a startup, we need to move fast and stay ahead. #CodeAI's automated
- coding assistant helps us do just that.
- <Highlight>Our development speed has doubled.</Highlight> Essential tool
- for any startup.
- </p>
- ),
- },
- {
- name: "Emily Chen",
- role: "Product Manager at Digital Wave",
- img: "https://randomuser.me/api/portraits/women/83.jpg",
- description: (
- <p>
- #VoiceGen's AI-driven voice synthesis has made creating global products
- a breeze.
- <Highlight>Localization is now seamless and efficient.</Highlight> A
- must-have for global product teams.
- </p>
- ),
- },
- {
- name: "Michael Brown",
- role: "Data Scientist at FinTech Innovations",
- img: "https://randomuser.me/api/portraits/men/1.jpg",
- description: (
- <p>
- Leveraging #DataCrunch's AI for our financial models has given us an
- edge in predictive accuracy.
- <Highlight>
- Our investment strategies are now powered by real-time data analytics.
- </Highlight>{" "}
- Transformative for the finance industry.
- </p>
- ),
- },
- {
- name: "Linda Wu",
- role: "VP of Operations at LogiChain Solutions",
- img: "https://randomuser.me/api/portraits/women/5.jpg",
- description: (
- <p>
- #LogiTech's supply chain optimization tools have drastically reduced our
- operational costs.
- <Highlight>
- Efficiency and accuracy in logistics have never been better.
- </Highlight>{" "}
- </p>
- ),
- },
- {
- name: "Carlos Gomez",
- role: "Head of R&D at EcoInnovate",
- img: "https://randomuser.me/api/portraits/men/14.jpg",
- description: (
- <p>
- By integrating #GreenTech's sustainable energy solutions, we've seen a
- significant reduction in carbon footprint.
- <Highlight>
- Leading the way in eco-friendly business practices.
- </Highlight>{" "}
- Pioneering change in the industry.
- </p>
- ),
- },
- {
- name: "Aisha Khan",
- role: "Chief Marketing Officer at Fashion Forward",
- img: "https://randomuser.me/api/portraits/women/56.jpg",
- description: (
- <p>
- #TrendSetter's market analysis AI has transformed how we approach
- fashion trends.
- <Highlight>
- Our campaigns are now data-driven with higher customer engagement.
- </Highlight>{" "}
- Revolutionizing fashion marketing.
- </p>
- ),
- },
- {
- name: "Tom Chen",
- role: "Director of IT at HealthTech Solutions",
- img: "https://randomuser.me/api/portraits/men/18.jpg",
- description: (
- <p>
- Implementing #MediCareAI in our patient care systems has improved
- patient outcomes significantly.
- <Highlight>
- Technology and healthcare working hand in hand for better health.
- </Highlight>{" "}
- A milestone in medical technology.
- </p>
- ),
- },
- // {
- // name: "Sofia Patel",
- // role: "CEO at EduTech Innovations",
- // description: (
- // <p>
- // #LearnSmart's AI-driven personalized learning plans have doubled student
- // performance metrics.
- // <Highlight>Education tailored to every learner's needs.</Highlight>{" "}
- // Transforming the educational landscape.
- // </p>
- // ),
- // },
- // {
- // name: "Jake Morrison",
- // role: "CTO at SecureNet Tech",
- // description: (
- // <p>
- // With #CyberShield's AI-powered security systems, our data protection
- // levels are unmatched.
- // <Highlight>Ensuring safety and trust in digital spaces.</Highlight>{" "}
- // Redefining cybersecurity standards.
- // </p>
- // ),
- // },
- // {
- // name: "Nadia Ali",
- // role: "Product Manager at Creative Solutions",
- // description: (
- // <p>
- // #DesignPro's AI has streamlined our creative process, enhancing
- // productivity and innovation.
- // <Highlight>Bringing creativity and technology together.</Highlight> A
- // game-changer for creative industries.
- // </p>
- // ),
- // },
- // {
- // name: "Omar Farooq",
- // role: "Founder at Startup Hub",
- // description: (
- // <p>
- // #VentureAI's insights into startup ecosystems have been invaluable for
- // our growth and funding strategies.
- // <Highlight>Empowering startups with data-driven decisions.</Highlight> A
- // catalyst for startup success.
- // </p>
- // ),
- // },
-];
-
-export default function SocialProofTestimonials() {
- return (
- <section id="testimonials">
- <div className="py-14">
- <div className="container mx-auto px-4 md:px-8">
- <h3 className="text-center text-sm font-semibold text-gray-500">
- TESTIMONIALS
- </h3>
- <div className="relative mt-6 max-h-[700px] overflow-hidden py-14">
- <div className="gap-4 md:columns-2 xl:columns-3 2xl:columns-4 ">
- {testimonials.map((card, idx) => (
- <TestimonialCard {...card} key={idx} />
- ))}
- </div>
- <div className="pointer-events-none absolute inset-x-0 bottom-0 h-1/2 w-full bg-gradient-to-t from-white from-20% dark:from-black"></div>
- </div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/blocks/example/social-proof-testimonials-3.tsx b/registry/blocks/example/social-proof-testimonials-3.tsx
deleted file mode 100644
index edc7cc5e..00000000
--- a/registry/blocks/example/social-proof-testimonials-3.tsx
+++ /dev/null
@@ -1,295 +0,0 @@
-import { cn } from "@/lib/utils";
-import Marquee from "@/registry/components/magicui/marquee";
-import { StarFilledIcon } from "@radix-ui/react-icons";
-
-export const Highlight = ({
- children,
- className,
-}: {
- children: React.ReactNode;
- className?: string;
-}) => {
- return (
- <span
- className={cn(
- "bg-cyan-600/20 p-1 py-0.5 font-bold text-cyan-600 dark:bg-cyan-600/20 dark:text-cyan-600",
- className,
- )}
- >
- {children}
- </span>
- );
-};
-
-export interface TestimonialCardProps {
- name: string;
- role: string;
- img?: string;
- description: React.ReactNode;
- className?: string;
- [key: string]: any;
-}
-
-export const TestimonialCard = ({
- description,
- name,
- img,
- role,
- className,
- ...props // Capture the rest of the props
-}: TestimonialCardProps) => (
- <div
- className={cn(
- "mb-4 flex w-full cursor-pointer break-inside-avoid flex-col items-center justify-between gap-6 rounded-xl p-4",
- // light styles
- " border border-neutral-200 bg-white",
- // dark styles
- "dark:bg-black dark:[border:1px_solid_rgba(255,255,255,.1)] dark:[box-shadow:0_-20px_80px_-20px_#ffffff1f_inset]",
- className,
- )}
- {...props} // Spread the rest of the props here
- >
- <div className="select-none text-sm font-normal text-neutral-700 dark:text-neutral-400">
- {description}
- <div className="flex flex-row py-1">
- <StarFilledIcon className="size-4 text-yellow-500" />
- <StarFilledIcon className="size-4 text-yellow-500" />
- <StarFilledIcon className="size-4 text-yellow-500" />
- <StarFilledIcon className="size-4 text-yellow-500" />
- <StarFilledIcon className="size-4 text-yellow-500" />
- </div>
- </div>
-
- <div className="flex w-full select-none items-center justify-start gap-5">
- <img
- src={img}
- className="h-10 w-10 rounded-full ring-1 ring-border ring-offset-4"
- />
-
- <div>
- <p className="font-medium text-neutral-500">{name}</p>
- <p className="text-xs font-normal text-neutral-400">{role}</p>
- </div>
- </div>
- </div>
-);
-
-const testimonials = [
- {
- name: "Alex Rivera",
- role: "CTO at InnovateTech",
- img: "https://randomuser.me/api/portraits/men/91.jpg",
- description: (
- <p>
- The AI-driven analytics from #QuantumInsights have revolutionized our
- product development cycle.
- <Highlight>
- Insights are now more accurate and faster than ever.
- </Highlight>{" "}
- A game-changer for tech companies.
- </p>
- ),
- },
- {
- name: "Samantha Lee",
- role: "Marketing Director at NextGen Solutions",
- img: "https://randomuser.me/api/portraits/women/12.jpg",
- description: (
- <p>
- Implementing #AIStream's customer prediction model has drastically
- improved our targeting strategy.
- <Highlight>Seeing a 50% increase in conversion rates!</Highlight> Highly
- recommend their solutions.
- </p>
- ),
- },
- {
- name: "Raj Patel",
- role: "Founder & CEO at StartUp Grid",
- img: "https://randomuser.me/api/portraits/men/45.jpg",
- description: (
- <p>
- As a startup, we need to move fast and stay ahead. #CodeAI's automated
- coding assistant helps us do just that.
- <Highlight>Our development speed has doubled.</Highlight> Essential tool
- for any startup.
- </p>
- ),
- },
- {
- name: "Emily Chen",
- role: "Product Manager at Digital Wave",
- img: "https://randomuser.me/api/portraits/women/83.jpg",
- description: (
- <p>
- #VoiceGen's AI-driven voice synthesis has made creating global products
- a breeze.
- <Highlight>Localization is now seamless and efficient.</Highlight> A
- must-have for global product teams.
- </p>
- ),
- },
- {
- name: "Michael Brown",
- role: "Data Scientist at FinTech Innovations",
- img: "https://randomuser.me/api/portraits/men/1.jpg",
- description: (
- <p>
- Leveraging #DataCrunch's AI for our financial models has given us an
- edge in predictive accuracy.
- <Highlight>
- Our investment strategies are now powered by real-time data analytics.
- </Highlight>{" "}
- Transformative for the finance industry.
- </p>
- ),
- },
- {
- name: "Linda Wu",
- role: "VP of Operations at LogiChain Solutions",
- img: "https://randomuser.me/api/portraits/women/5.jpg",
- description: (
- <p>
- #LogiTech's supply chain optimization tools have drastically reduced our
- operational costs.
- <Highlight>
- Efficiency and accuracy in logistics have never been better.
- </Highlight>{" "}
- </p>
- ),
- },
- {
- name: "Carlos Gomez",
- role: "Head of R&D at EcoInnovate",
- img: "https://randomuser.me/api/portraits/men/14.jpg",
- description: (
- <p>
- By integrating #GreenTech's sustainable energy solutions, we've seen a
- significant reduction in carbon footprint.
- <Highlight>
- Leading the way in eco-friendly business practices.
- </Highlight>{" "}
- Pioneering change in the industry.
- </p>
- ),
- },
- {
- name: "Aisha Khan",
- role: "Chief Marketing Officer at Fashion Forward",
- img: "https://randomuser.me/api/portraits/women/56.jpg",
- description: (
- <p>
- #TrendSetter's market analysis AI has transformed how we approach
- fashion trends.
- <Highlight>
- Our campaigns are now data-driven with higher customer engagement.
- </Highlight>{" "}
- Revolutionizing fashion marketing.
- </p>
- ),
- },
- {
- name: "Tom Chen",
- role: "Director of IT at HealthTech Solutions",
- img: "https://randomuser.me/api/portraits/men/18.jpg",
- description: (
- <p>
- Implementing #MediCareAI in our patient care systems has improved
- patient outcomes significantly.
- <Highlight>
- Technology and healthcare working hand in hand for better health.
- </Highlight>{" "}
- A milestone in medical technology.
- </p>
- ),
- },
- {
- name: "Sofia Patel",
- role: "CEO at EduTech Innovations",
- img: "https://randomuser.me/api/portraits/women/73.jpg",
- description: (
- <p>
- #LearnSmart's AI-driven personalized learning plans have doubled student
- performance metrics.
- <Highlight>Education tailored to every learner's needs.</Highlight>{" "}
- Transforming the educational landscape.
- </p>
- ),
- },
- {
- name: "Jake Morrison",
- role: "CTO at SecureNet Tech",
- img: "https://randomuser.me/api/portraits/men/25.jpg",
- description: (
- <p>
- With #CyberShield's AI-powered security systems, our data protection
- levels are unmatched.
- <Highlight>Ensuring safety and trust in digital spaces.</Highlight>{" "}
- Redefining cybersecurity standards.
- </p>
- ),
- },
- {
- name: "Nadia Ali",
- role: "Product Manager at Creative Solutions",
- img: "https://randomuser.me/api/portraits/women/78.jpg",
- description: (
- <p>
- #DesignPro's AI has streamlined our creative process, enhancing
- productivity and innovation.
- <Highlight>Bringing creativity and technology together.</Highlight> A
- game-changer for creative industries.
- </p>
- ),
- },
- {
- name: "Omar Farooq",
- role: "Founder at Startup Hub",
- img: "https://randomuser.me/api/portraits/men/54.jpg",
- description: (
- <p>
- #VentureAI's insights into startup ecosystems have been invaluable for
- our growth and funding strategies.
- <Highlight>Empowering startups with data-driven decisions.</Highlight> A
- catalyst for startup success.
- </p>
- ),
- },
-];
-
-export default function SocialProofTestimonials() {
- return (
- <section id="testimonials">
- <div className="py-14">
- <div className="container mx-auto px-4 md:px-8">
- <h3 className="text-center text-sm font-semibold text-gray-500">
- TESTIMONIALS
- </h3>
- <div className="relative mt-6 max-h-[650px] overflow-hidden">
- <div className="gap-4 md:columns-2 xl:columns-3 2xl:columns-4">
- {Array(Math.ceil(testimonials.length / 3))
- .fill(0)
- .map((_, i) => (
- <Marquee
- vertical
- key={i}
- className={cn({
- "[--duration:60s]": i === 1,
- "[--duration:30s]": i === 2,
- "[--duration:70s]": i === 3,
- })}
- >
- {testimonials.slice(i * 3, (i + 1) * 3).map((card, idx) => (
- <TestimonialCard {...card} key={idx} />
- ))}
- </Marquee>
- ))}
- </div>
- <div className="pointer-events-none absolute inset-x-0 bottom-0 h-1/4 w-full bg-gradient-to-t from-white from-20% dark:from-black"></div>
- <div className="pointer-events-none absolute inset-x-0 top-0 h-1/4 w-full bg-gradient-to-b from-white from-20% dark:from-black"></div>
- </div>
- </div>
- </div>
- </section>
- );
-}
diff --git a/registry/index.tsx b/registry/index.tsx
index 80e85fb4..1679f0a6 100644
--- a/registry/index.tsx
+++ b/registry/index.tsx
@@ -554,178 +554,7 @@ const example: Registry = {
},
};
-const blocks: Registry = {
- "header-1": {
- name: "header-1",
- type: "blocks:example",
- files: ["registry/blocks/example/header-1.tsx"],
- component: React.lazy(() => import("@/registry/blocks/example/header-1")),
- },
- "header-2": {
- name: "header-2",
- type: "blocks:example",
- files: ["registry/blocks/example/header-2.tsx"],
- component: React.lazy(() => import("@/registry/blocks/example/header-2")),
- },
-
- "footer-1": {
- name: "footer-1",
- type: "blocks:example",
- files: ["registry/blocks/example/footer-1.tsx"],
- component: React.lazy(() => import("@/registry/blocks/example/footer-1")),
- },
- "footer-2": {
- name: "footer-2",
- type: "blocks:example",
- files: ["registry/blocks/example/footer-2.tsx"],
- component: React.lazy(() => import("@/registry/blocks/example/footer-2")),
- },
- "hero-1": {
- name: "hero-1",
- type: "blocks:example",
- files: ["registry/blocks/example/hero-1.tsx"],
- component: React.lazy(() => import("@/registry/blocks/example/hero-1")),
- },
- "hero-2": {
- name: "hero-2",
- type: "blocks:example",
- files: ["registry/blocks/example/hero-2.tsx"],
- component: React.lazy(() => import("@/registry/blocks/example/hero-2")),
- },
- "social-proof-press-1": {
- name: "social-proof-press-1",
- type: "blocks:example",
- files: ["registry/blocks/example/social-proof-press-1.tsx"],
- component: React.lazy(
- () => import("@/registry/blocks/example/social-proof-press-1"),
- ),
- },
- "social-proof-press-2": {
- name: "social-proof-press-2",
- type: "blocks:example",
- files: ["registry/blocks/example/social-proof-press-2.tsx"],
- component: React.lazy(
- () => import("@/registry/blocks/example/social-proof-press-2"),
- ),
- },
- "social-proof-press-3": {
- name: "social-proof-press-3",
- type: "blocks:example",
- files: ["registry/blocks/example/social-proof-press-3.tsx"],
- component: React.lazy(
- () => import("@/registry/blocks/example/social-proof-press-3"),
- ),
- },
- "social-proof-companies-1": {
- name: "social-proof-companies-1",
- type: "blocks:example",
- files: ["registry/blocks/example/social-proof-companies-1.tsx"],
- component: React.lazy(
- () => import("@/registry/blocks/example/social-proof-companies-1"),
- ),
- },
- "social-proof-companies-2": {
- name: "social-proof-companies-2",
- type: "blocks:example",
- files: ["registry/blocks/example/social-proof-companies-2.tsx"],
- component: React.lazy(
- () => import("@/registry/blocks/example/social-proof-companies-2"),
- ),
- },
- "social-proof-companies-3": {
- name: "social-proof-companies-3",
- type: "blocks:example",
- files: ["registry/blocks/example/social-proof-companies-3.tsx"],
- component: React.lazy(
- () => import("@/registry/blocks/example/social-proof-companies-3"),
- ),
- },
- "social-proof-companies-4": {
- name: "social-proof-companies-4",
- type: "blocks:example",
- files: ["registry/blocks/example/social-proof-companies-4.tsx"],
- component: React.lazy(
- () => import("@/registry/blocks/example/social-proof-companies-4"),
- ),
- },
- "social-proof-testimonials-1": {
- name: "social-proof-testimonials-1",
- type: "blocks:example",
- files: ["registry/blocks/example/social-proof-testimonials-1.tsx"],
- component: React.lazy(
- () => import("@/registry/blocks/example/social-proof-testimonials-1"),
- ),
- },
- "social-proof-testimonials-2": {
- name: "social-proof-testimonials-2",
- type: "blocks:example",
- files: ["registry/blocks/example/social-proof-testimonials-2.tsx"],
- component: React.lazy(
- () => import("@/registry/blocks/example/social-proof-testimonials-2"),
- ),
- },
- "social-proof-testimonials-3": {
- name: "social-proof-testimonials-3",
- type: "blocks:example",
- files: ["registry/blocks/example/social-proof-testimonials-3.tsx"],
- component: React.lazy(
- () => import("@/registry/blocks/example/social-proof-testimonials-3"),
- ),
- },
- "call-to-action-1": {
- name: "call-to-action-1",
- type: "blocks:example",
- files: ["registry/blocks/example/call-to-action-1.tsx"],
- component: React.lazy(
- () => import("@/registry/blocks/example/call-to-action-1"),
- ),
- },
- "call-to-action-2": {
- name: "call-to-action-2",
- type: "blocks:example",
- files: ["registry/blocks/example/call-to-action-2.tsx"],
- component: React.lazy(
- () => import("@/registry/blocks/example/call-to-action-2"),
- ),
- },
- "call-to-action-3": {
- name: "call-to-action-3",
- type: "blocks:example",
- files: ["registry/blocks/example/call-to-action-3.tsx"],
- component: React.lazy(
- () => import("@/registry/blocks/example/call-to-action-3"),
- ),
- },
- "call-to-action-4": {
- name: "call-to-action-4",
- type: "blocks:example",
- files: ["registry/blocks/example/call-to-action-4.tsx"],
- component: React.lazy(
- () => import("@/registry/blocks/example/call-to-action-4"),
- ),
- },
- "pricing-1": {
- name: "pricing-1",
- type: "blocks:example",
- files: ["registry/blocks/example/pricing-1.tsx"],
- component: React.lazy(() => import("@/registry/blocks/example/pricing-1")),
- },
- "pricing-2": {
- name: "pricing-2",
- type: "blocks:example",
- files: ["registry/blocks/example/pricing-2.tsx"],
- component: React.lazy(() => import("@/registry/blocks/example/pricing-2")),
- },
- "faq-1": {
- name: "faq-1",
- type: "blocks:example",
- files: ["registry/blocks/example/faq-1.tsx"],
- component: React.lazy(() => import("@/registry/blocks/example/faq-1")),
- },
-};
-
export const registry: Registry = {
...ui,
...example,
- ...blocks,
};
diff --git a/registry/schema.ts b/registry/schema.ts
index 6032421a..39abe976 100644
--- a/registry/schema.ts
+++ b/registry/schema.ts
@@ -11,7 +11,6 @@ export const registrySchema = z.record(
"components:ui",
"components:component",
"components:example",
- "blocks:example",
]),
component: z.function().args(z.any()).returns(z.any()).optional(),
}),
diff --git a/scripts/create-payment.ts b/scripts/create-payment.ts
deleted file mode 100644
index 361788d8..00000000
--- a/scripts/create-payment.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { PrismaClient } from "@prisma/client";
-import Stripe from "stripe";
-
-const db = new PrismaClient();
-
-export const stripe = new Stripe(process.env.STRIPE_API_KEY!, {
- apiVersion: "2022-11-15",
- typescript: true,
-});
-
-async function seed() {
- const user = await db.user.findFirst({
- where: {
- email: "[email protected]",
- },
- include: {
- customer: true,
- },
- });
-
- if (!user) {
- throw new Error("User not found");
- }
-
- if (!user.customer) {
- throw new Error("Customer not found");
- }
-
- try {
- await db.payment.create({
- data: {
- stripeId: user.customer.stripeId,
- amount: 0,
- currency: "USD",
- status: "succeeded",
- customer: { connect: { id: user.customer.id } },
- },
- });
-
- console.log("✅ ");
- } catch (e) {
- console.log("❌ ");
- console.error(e);
- }
-}
-
-seed()
- .catch((e) => {
- console.error(e);
- process.exit(1);
- })
- .finally(async () => {
- await db.$disconnect();
- });
diff --git a/scripts/load-test.sh b/scripts/load-test.sh
deleted file mode 100755
index ee9f6c02..00000000
--- a/scripts/load-test.sh
+++ /dev/null
@@ -1,20 +0,0 @@
-max="$1"
-date
-echo "url: $2
-rate: $max calls / second"
-START=$(date +%s);
-
-get () {
- curl -s -v "$1" 2>&1 | tr '\r\n' '\\n' | awk -v date="$(date +'%r')" '{print $0"\n-----", date}' >> /tmp/perf-test.log
-}
-
-while true
-do
- echo $(($(date +%s) - START)) | awk '{print int($1/60)":"int($1%60)}'
- sleep 1
-
- for i in `seq 1 $max`
- do
- get $2 &
- done
-done
\ No newline at end of file