From e35357a850db28e89321a2f2f8b529b9af9720fe Mon Sep 17 00:00:00 2001 From: Arjun Komath Date: Mon, 20 Jan 2025 07:46:47 +1100 Subject: [PATCH] Add live demo --- app/(auth)/sign-in/page.tsx | 28 +++++- app/(dashboard)/[tenant]/today/page.tsx | 1 - app/page.tsx | 20 +++-- components/feature-section.tsx | 111 ++++++++++++++++++++++++ components/ui/dot-pattern.tsx | 57 ++++++++++++ 5 files changed, 207 insertions(+), 10 deletions(-) create mode 100644 components/feature-section.tsx create mode 100644 components/ui/dot-pattern.tsx diff --git a/app/(auth)/sign-in/page.tsx b/app/(auth)/sign-in/page.tsx index 5339de7..9d465e1 100644 --- a/app/(auth)/sign-in/page.tsx +++ b/app/(auth)/sign-in/page.tsx @@ -1,15 +1,25 @@ import { logtoConfig } from "@/app/logto"; import { Button } from "@/components/ui/button"; import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { DotPattern } from "@/components/ui/dot-pattern"; +import { cn } from "@/lib/utils"; import { signIn } from "@logto/next/server-actions"; import Image from "next/image"; import Link from "next/link"; import logo from "../../../public/images/logo.png"; -export default function SignInForm() { +export default async function SignInForm(props: { + searchParams: Promise<{ + demo: string; + }>; +}) { + const query = await props.searchParams; + const isDemo = query.demo === "true"; + return (
- + +
+ {isDemo ? ( +
+

+ Try the demo account to see how it works, login with the + following credentials. +

+
+ User ID:
demo
+
+
+ Password:
w-okDQsz
+
+
+ ) : null}