Skip to content

A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!

fix: auth layout if email is the only auth provider

Amruth Pillai6e53a0f7a32f
diff --git a/apps/client/src/pages/auth/layout.tsx b/apps/client/src/pages/auth/layout.tsx
index 849382829..c5b32a92a 100644
--- a/apps/client/src/pages/auth/layout.tsx
+++ b/apps/client/src/pages/auth/layout.tsx
@@ -14,14 +14,14 @@ const authRoutes = [{ path: "/auth/login" }, { path: "/auth/register" }];
export const AuthLayout = () => {
const location = useLocation();
-
const { providers } = useAuthProviders();
- const emailAuthDisabled = !providers || !providers.includes("email");
-
const isAuthRoute = useMemo(() => matchRoutes(authRoutes, location) !== null, [location]);
if (!providers) return null;
+ // Condition (providers.length === 1) hides the divider if providers[] includes only "email"
+ const hideDivider = !providers.includes("email") || providers.length === 1;
+
return (
<div className="flex h-screen w-screen">
<div className="relative flex w-full flex-col justify-center gap-y-8 px-12 sm:mx-auto sm:basis-[420px] sm:px-0 lg:basis-[480px] lg:px-12">
@@ -40,7 +40,7 @@ export const AuthLayout = () => {
{isAuthRoute && (
<>
- <div className={cn("flex items-center gap-x-4", emailAuthDisabled && "hidden")}>
+ <div className={cn("flex items-center gap-x-4", hideDivider && "hidden")}>
<hr className="flex-1" />
<span className="text-xs font-medium">
{t({
diff --git a/apps/server/src/storage/storage.service.ts b/apps/server/src/storage/storage.service.ts
index 1a7071bee..01ccf6f70 100644
--- a/apps/server/src/storage/storage.service.ts
+++ b/apps/server/src/storage/storage.service.ts
@@ -17,7 +17,7 @@ import { Config } from "../config/schema";
type ImageUploadType = "pictures" | "previews";
type DocumentUploadType = "resumes";
-type UploadType = ImageUploadType | DocumentUploadType;
+export type UploadType = ImageUploadType | DocumentUploadType;
const PUBLIC_ACCESS_POLICY = {
Version: "2012-10-17",