Rallly is an open-source scheduling and collaboration tool designed to make organizing events and meetings easier.
TypeScript i18nextnext-authnextjspostgresqlprismareact-emailt3-stacktailwindcsstrpcturborepotypescriptzod
💄 Simplify login provider options (#2956)
Luke Vellaf6200ae297a2
diff --git a/apps/web/public/locales/en/app.json b/apps/web/public/locales/en/app.jsonindex 77ab45739..5d35fae99 100644--- a/apps/web/public/locales/en/app.json+++ b/apps/web/public/locales/en/app.json@@ -163,7 +163,6 @@"content": "Content","continue": "Continue","continueWithEmail": "Continue with email",- "continueWithProvider": "Continue with {provider}","controlPanel": "Control Panel","copied": "Copied","copiedToClipboard": "Copied to clipboard",@@ -524,7 +523,6 @@"optionCount": "{count, plural, one {# option} other {# options}}","optionsSelected": "{count, plural, =0 {None selected} one {# option selected} other {# options selected}}","optionVoteBreakdown": "{yesScore} yes, {ifNeedBeScore} if need be",- "or": "Or","organizationName": "Organization name","organizationNamePlaceholder": "e.g. Acme Corp","organizationNameRequired": "Organization name is required",diff --git a/apps/web/src/features/auth/components/login-with-oidc.tsx b/apps/web/src/features/auth/components/login-with-oidc.tsxindex c3267c35a..af462f6b7 100644--- a/apps/web/src/features/auth/components/login-with-oidc.tsx+++ b/apps/web/src/features/auth/components/login-with-oidc.tsx@@ -1,7 +1,6 @@"use client";import { Button } from "@rallly/ui/button";-import { Trans } from "@/i18n/client";import { authClient } from "@/lib/auth-client";import { validateRedirectUrl } from "@/lib/utils/redirect";@@ -24,11 +23,7 @@ export function LoginWithOIDC({className="w-full"size="xl">- <Trans- i18nKey="continueWithProvider"- defaults="Continue with {provider}"- values={{ provider: name }}- />+ {name}</Button>);}diff --git a/apps/web/src/features/auth/components/or-divider.tsx b/apps/web/src/features/auth/components/or-divider.tsxindex ef9fab959..60cf092a6 100644--- a/apps/web/src/features/auth/components/or-divider.tsx+++ b/apps/web/src/features/auth/components/or-divider.tsx@@ -1,13 +1,8 @@-import { getTranslation } from "@/i18n/server";--export async function OrDivider() {- const { t } = await getTranslation();+export function OrDivider() {return (- <div className="flex items-center gap-x-2.5">+ <div className="flex items-center gap-x-2.5 py-2"><hr className="grow border-gray-100 dark:border-gray-700" />- <div className="text-muted-foreground lowercase">- {t("or", { defaultValue: "Or" })}- </div>+ <div className="text-muted-foreground text-xs">or continue with</div><hr className="grow border-gray-100 dark:border-gray-700" /></div>);diff --git a/apps/web/src/features/auth/components/sso-provider.tsx b/apps/web/src/features/auth/components/sso-provider.tsxindex f43ce006e..d54b3942a 100644--- a/apps/web/src/features/auth/components/sso-provider.tsx+++ b/apps/web/src/features/auth/components/sso-provider.tsx@@ -4,26 +4,16 @@ import { Icon } from "@rallly/ui/icon";import { UserIcon } from "lucide-react";import Image from "next/image";-import { Trans, useTranslation } from "@/i18n/client";import { authClient } from "@/lib/auth-client";import { validateRedirectUrl } from "@/lib/utils/redirect";function SSOImage({ provider }: { provider: string }) {if (provider === "google") {- return (- <Image src="/static/google.svg" width={16} alt="Google" height={16} />- );+ return <Image src="/static/google.svg" width={16} alt="" height={16} />;}if (provider === "microsoft-entra-id" || provider === "microsoft") {- return (- <Image- src="/static/microsoft.svg"- width={16}- alt="Microsoft"- height={16}- />- );+ return <Image src="/static/microsoft.svg" width={16} alt="" height={16} />;}if (provider === "oidc") {@@ -46,15 +36,9 @@ export function SSOProvider({name: string;redirectTo?: string;}) {- const { t } = useTranslation();return (<Buttonsize="xl"- aria-label={t("continueWithProvider", {- provider: name,- ns: "app",- defaultValue: "Continue with {provider}",- })}key={providerId}onClick={() => {authClient.signIn.social({@@ -64,13 +48,7 @@ export function SSOProvider({}}><SSOImage provider={providerId} />- <span>- <Trans- i18nKey="continueWithProvider"- defaults="Continue with {provider}"- values={{ provider: name }}- />- </span>+ <span>{name}</span></Button>);}