From f2608caa8221ad6a574c26e7e8e1d543bbb8258d Mon Sep 17 00:00:00 2001 From: Harshith Mullapudi Date: Fri, 13 Jun 2025 11:04:43 +0530 Subject: [PATCH] Fix: text is not removed from ingest box after API call --- .../app/components/dashboard/ingest.tsx | 2 + apps/webapp/app/env.server.ts | 2 + apps/webapp/app/routes/login._index.tsx | 6 +-- apps/webapp/app/routes/login.magic.tsx | 14 +++--- apps/webapp/app/services/auth.server.ts | 2 +- docker/docker-compose.yaml | 47 ++++++++++++------- docker/scripts/entrypoint.sh | 2 - 7 files changed, 46 insertions(+), 29 deletions(-) diff --git a/apps/webapp/app/components/dashboard/ingest.tsx b/apps/webapp/app/components/dashboard/ingest.tsx index e63f884..8a3fa00 100644 --- a/apps/webapp/app/components/dashboard/ingest.tsx +++ b/apps/webapp/app/components/dashboard/ingest.tsx @@ -31,6 +31,8 @@ export const Ingest = () => { }, { method: "POST", action: "/home/dashboard" }, ); + + setText(""); }; const isLoading = fetcher.state === "submitting"; diff --git a/apps/webapp/app/env.server.ts b/apps/webapp/app/env.server.ts index 4c9d379..ef50d4c 100644 --- a/apps/webapp/app/env.server.ts +++ b/apps/webapp/app/env.server.ts @@ -45,6 +45,8 @@ const EnvironmentSchema = z.object({ AUTH_GOOGLE_CLIENT_ID: z.string().optional(), AUTH_GOOGLE_CLIENT_SECRET: z.string().optional(), + ENABLE_EMAIL_LOGIN: z.coerce.boolean().default(false), + //Redis REDIS_HOST: z.string().default("localhost"), REDIS_PORT: z.coerce.number().default(6379), diff --git a/apps/webapp/app/routes/login._index.tsx b/apps/webapp/app/routes/login._index.tsx index 7a10b64..f4814bb 100644 --- a/apps/webapp/app/routes/login._index.tsx +++ b/apps/webapp/app/routes/login._index.tsx @@ -35,7 +35,7 @@ export async function loader({ request }: LoaderFunctionArgs) { { redirectTo, showGoogleAuth: isGoogleAuthSupported, - isDevelopment: env.NODE_ENV === "development", + emailLoginEnabled: env.ENABLE_EMAIL_LOGIN, }, { headers: { @@ -47,7 +47,7 @@ export async function loader({ request }: LoaderFunctionArgs) { return typedjson({ redirectTo: null, showGoogleAuth: isGoogleAuthSupported, - isDevelopment: env.NODE_ENV === "development", + emailLoginEnabled: env.ENABLE_EMAIL_LOGIN, }); } } @@ -80,7 +80,7 @@ export default function LoginPage() { )} - {data.isDevelopment && ( + {data.emailLoginEnabled && (