LibreChat/client/src/components/Auth/Footer.tsx
Vesna Tan 7f50d2f7c0
🤲 a11y: Add landmark to footer, labels updates, and sidebar text contrast (#3630)
* add landmark contentinfo to footer

* fix aria-label ai model menuitem for issue #3587

* changed group/today text color to #535353
2024-08-16 03:27:56 -04:00

45 lines
1.3 KiB
TypeScript

import { useLocalize } from '~/hooks';
import { TStartupConfig } from 'librechat-data-provider';
function Footer({ startupConfig }: { startupConfig: TStartupConfig | null | undefined }) {
const localize = useLocalize();
if (!startupConfig) {
return null;
}
const privacyPolicy = startupConfig.interface?.privacyPolicy;
const termsOfService = startupConfig.interface?.termsOfService;
const privacyPolicyRender = privacyPolicy?.externalUrl && (
<a
className="text-sm text-green-500"
href={privacyPolicy.externalUrl}
target={privacyPolicy.openNewTab ? '_blank' : undefined}
rel="noreferrer"
>
{localize('com_ui_privacy_policy')}
</a>
);
const termsOfServiceRender = termsOfService?.externalUrl && (
<a
className="text-sm text-green-500"
href={termsOfService.externalUrl}
target={termsOfService.openNewTab ? '_blank' : undefined}
rel="noreferrer"
>
{localize('com_ui_terms_of_service')}
</a>
);
return (
<div className="align-end m-4 flex justify-center gap-2" role="contentinfo">
{privacyPolicyRender}
{privacyPolicyRender && termsOfServiceRender && (
<div className="border-r-[1px] border-gray-300 dark:border-gray-600" />
)}
{termsOfServiceRender}
</div>
);
}
export default Footer;