import React from "react"; import Link from "next/link"; import { EAuthModes } from "@plane/constants"; interface TermsAndConditionsProps { authType?: EAuthModes; } // Constants for better maintainability const LEGAL_LINKS = { termsOfService: "https://plane.so/legals/terms-and-conditions", privacyPolicy: "https://plane.so/legals/privacy-policy", } as const; const MESSAGES = { [EAuthModes.SIGN_UP]: "By creating an account", [EAuthModes.SIGN_IN]: "By signing in", } as const; // Reusable link component to reduce duplication const LegalLink: React.FC<{ href: string; children: React.ReactNode }> = ({ href, children }) => ( {children} ); export const TermsAndConditions: React.FC = ({ authType = EAuthModes.SIGN_IN }) => (

{`${MESSAGES[authType]}, you understand and agree to \n our `} Terms of Service and{" "} Privacy Policy.

);