mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-20 10:20:15 +01:00
* add landmark contentinfo to footer * fix aria-label ai model menuitem for issue #3587 * changed group/today text color to #535353
45 lines
1.3 KiB
TypeScript
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;
|