Skip to content

A full-featured CRM built with React, shadcn/ui, and Supabase.

Customize login page.

Matthieu Hochlander152cd4c5bbf6
diff --git a/src/components/admin/login-page.tsx b/src/components/admin/login-page.tsx
index 70d11a21..0f132212 100644
--- a/src/components/admin/login-page.tsx
+++ b/src/components/admin/login-page.tsx
@@ -4,8 +4,10 @@ import type { SubmitHandler, FieldValues } from "react-hook-form";
import { Button } from "@/components/ui/button";
import { TextInput } from "@/components/admin/text-input";
import { Notification } from "@/components/admin/notification";
+import { useConfigurationContext } from "@/atomic-crm/root/ConfigurationContext.tsx";
export const LoginPage = (props: { redirectTo?: string }) => {
+ const { darkModeLogo, title } = useConfigurationContext();
const { redirectTo } = props;
const [loading, setLoading] = useState(false);
const login = useLogin();
@@ -46,38 +48,14 @@ export const LoginPage = (props: { redirectTo?: string }) => {
<div className="relative hidden h-full flex-col bg-muted p-10 text-white dark:border-r lg:flex">
<div className="absolute inset-0 bg-zinc-900" />
<div className="relative z-20 flex items-center text-lg font-medium">
- <svg
- xmlns="http://www.w3.org/2000/svg"
- viewBox="0 0 24 24"
- fill="none"
- stroke="currentColor"
- strokeWidth="2"
- strokeLinecap="round"
- strokeLinejoin="round"
- className="mr-2 h-6 w-6"
- >
- <path d="M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3" />
- </svg>
- Acme Inc
- </div>
- <div className="relative z-20 mt-auto">
- <blockquote className="space-y-2">
- <p className="text-lg">
- &ldquo;Shadcn Admin Kit has allowed us to quickly create and
- evolve a powerful tool that otherwise would have taken months of
- time and effort to develop.&rdquo;
- </p>
- <footer className="text-sm">John Doe</footer>
- </blockquote>
+ <img className="h-6 mr-2" src={darkModeLogo} alt={title} />
+ {title}
</div>
</div>
<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">
<h1 className="text-2xl font-semibold tracking-tight">Sign in</h1>
- <p className="text-sm leading-none text-muted-foreground">
- Try [email protected] / password
- </p>
</div>
<Form className="space-y-8" onSubmit={handleSubmit}>
<TextInput