From eff2f8340b3a0f8494eeefc753bac72715cb56dd Mon Sep 17 00:00:00 2001
From: MohamedBassem <me@mbassem.com>
Date: Tue, 26 Mar 2024 13:33:44 +0000
Subject: fix: Allow setting demo mode creds when demo mode is enabled

---
 apps/web/components/signin/SignInForm.tsx | 9 +++++++++
 1 file changed, 9 insertions(+)

(limited to 'apps/web/components/signin/SignInForm.tsx')

diff --git a/apps/web/components/signin/SignInForm.tsx b/apps/web/components/signin/SignInForm.tsx
index aa70e207..5991d2f2 100644
--- a/apps/web/components/signin/SignInForm.tsx
+++ b/apps/web/components/signin/SignInForm.tsx
@@ -1,5 +1,7 @@
 import { getProviders } from "next-auth/react";
 
+import serverConfig from "@hoarder/shared/config";
+
 import CredentialsForm from "./CredentialsForm";
 import SignInProviderButton from "./SignInProviderButton";
 
@@ -15,6 +17,13 @@ export default async function SignInForm() {
 
   return (
     <div className="flex flex-col items-center space-y-2">
+      {serverConfig.demoMode && (
+        <div className="mb-1 w-full items-start space-y-1 rounded bg-accent p-3">
+          <p className="text-center font-bold">Demo Mode</p>
+          <p>Email: {serverConfig.demoMode.email} </p>
+          <p>Password: {serverConfig.demoMode.password} </p>
+        </div>
+      )}
       <CredentialsForm />
 
       {providerValues && providerValues.length > 0 && (
-- 
cgit v1.2.3-70-g09d2

