Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/app/layout.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,9 @@ export default function RootLayout({ children }) {
{ label: 'Privacy', href: '/privacy' },
{ label: 'Terms', href: '/terms' },
{ label: 'GitHub', href: 'https://github.com/profullstack/qryptchat-web' },
...(process.env.NEXT_PUBLIC_ONION_URL && !new URL(SITE_URL).hostname.endsWith('.onion')
? [{ label: 'Also on Tor', href: process.env.NEXT_PUBLIC_ONION_URL }]
: []),
]}
/>
}
Expand Down
24 changes: 2 additions & 22 deletions src/lib/components/Footer.jsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
'use client';

// One footer row: links, copyright and the Profullstack ring come from
// @profullstack/footer, server-rendered in app/layout.jsx and passed in as
// `bottom`. The Tor mirror link sits just above it when configured.
// The shared Profullstack footer is passed in by app/layout.jsx.
export default function Footer({ bottom }) {
const onionUrl = process.env.NEXT_PUBLIC_ONION_URL;
const isOnionSite = typeof window !== 'undefined' && window.location.hostname.endsWith('.onion');

return (
<footer className="footer">
{!isOnionSite && onionUrl && (
<p className="footer-onion">
🧅 Also on Tor: <a href={onionUrl} target="_blank" rel="noopener noreferrer">{onionUrl}</a>
</p>
)}
{bottom}

<style>{`
.footer { background: var(--color-bg-secondary); border-top: 1px solid var(--color-border-primary); color: var(--color-text-secondary); }
.footer-onion { margin: 0; padding-top: var(--space-4); text-align: center; font-size: 0.75rem; word-break: break-all; }
.footer-onion a { color: var(--color-brand-primary); }
`}</style>
</footer>
);
return bottom;
}
Loading