Update Footer.tsx

This commit is contained in:
Zeno Kapitein
2026-01-21 11:54:30 +01:00
parent 9b4e4055bd
commit 27f21a3952
@@ -8,6 +8,7 @@ import { tcls } from '@/lib/tailwind';
import { ThemeToggler } from '../ThemeToggler';
import { CONTAINER_STYLE } from '../layout';
import { FooterLinksGroup } from './FooterLinksGroup';
import { SocialLink } from './SocialLink';
const FOOTER_COLUMNS = 4;
@@ -23,6 +24,8 @@ export function Footer(props: { context: GitBookSiteContext }) {
const mobileOnly = !hasLogo && !hasGroups && !hasCopyright && hasThemeToggle;
const socialLinks = customization.socialAccounts.filter((account) => account.display?.footer);
return (
<footer
id="site-footer"
@@ -137,6 +140,21 @@ export function Footer(props: { context: GitBookSiteContext }) {
) : null
}
{
// Social Links
socialLinks.length > 0 ? (
<div className="col-span-full flex w-full grow items-center justify-center gap-2">
{socialLinks.map((account) => (
<SocialLink
key={`${account.platform}-${account.handle}`}
account={account}
target={customization.externalLinks.target}
/>
))}
</div>
) : null
}
{
// Legal
customization.footer.copyright ? (