This repository has been archived on 2026-11-17. You can view files and clone it, but cannot push or open issues or pull requests.
gitgram-ai/gitgram/web/components/Navigation.tsx
caelum0x 49b183818c Unify gitgram + aitimemachine into the monorepo (de-submodule) and merge vendored engines
Convert gitgram/ and aitimemachine/ from embedded git repos (which showed as
opaque submodule gitlinks on GitHub) into fully-tracked first-party content.

AITM now merges its 7 vendored repos as first-party engines:
- memory: beads (Go task DAG) + context7 (docs SDK), unified into saved_contexts
- git: vendored C git (bundled binary) + gitnexus (in-process code intelligence)
- agentic: a2a (@a2a-js/sdk) + pal (AITM-managed Python subprocess)

Includes the full session's product build: Gitgram web/mobile/backend features,
AITM website/CLI/MCP, the unified memory layer, engine build tooling
(scripts/build-engines.sh, Dockerfile, CI), docs (README, ENGINES.md, ARCHITECTURE.md),
and extensive test suites.

Build artifacts, node_modules, external/, and gemini-cli are gitignored.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-23 14:14:09 +03:00

74 lines
2.7 KiB
TypeScript

'use client';
import Link from 'next/link';
import { usePathname } from 'next/navigation';
import AccountSwitcher from './AccountSwitcher';
import SearchBar from './SearchBar';
import { useAuthStore } from '@/store/authStore';
export default function Navigation() {
const pathname = usePathname();
const isAuthenticated = useAuthStore((s) => s.isAuthenticated);
// Public links accessible to all users
const publicLinks = [
{ href: '/', label: 'Home', icon: '🏠' },
{ href: '/discover', label: 'Discover', icon: '🔭' },
{ href: '/explore/repos', label: 'Explore', icon: '🔍' },
];
// Protected links only shown when authenticated
const protectedLinks = [
{ href: '/saved/repos', label: 'Following', icon: '📦' },
{ href: '/messages', label: 'Messages', icon: '💬' },
{ href: '/notifications', label: 'Notifications', icon: '🔔' },
{ href: '/profile', label: 'Profile', icon: '👤' },
{ href: '/settings/account', label: 'Settings', icon: '⚙️' },
{ href: '/claim', label: 'Claim Repo', icon: '✨' },
{ href: '/tools/repo-to-text', label: 'Repo→Text', icon: '🤖' },
{ href: '/tools/analyze', label: 'AI Analyze', icon: '🧠' },
{ href: '/reels', label: 'Reels', icon: '🎬' },
];
// Combine links based on authentication state
const links = isAuthenticated
? [...publicLinks, ...protectedLinks]
: publicLinks;
return (
<nav className="bg-white dark:bg-gray-800 border-b border-gray-200 dark:border-gray-700 sticky top-0 z-50">
<div className="max-w-7xl mx-auto px-4">
<div className="flex items-center justify-between h-16">
<div className="flex items-center gap-8">
<Link href="/" className="text-2xl font-bold bg-gradient-to-r from-purple-600 to-pink-600 bg-clip-text text-transparent">
Gitgram
</Link>
<div className="hidden md:flex gap-4">
{links.map((link) => (
<Link
key={link.href}
href={link.href}
className={`px-3 py-2 rounded-lg transition ${
pathname === link.href
? 'bg-gray-100 dark:bg-gray-700 font-medium'
: 'hover:bg-gray-50 dark:hover:bg-gray-700'
}`}
>
<span className="mr-2">{link.icon}</span>
{link.label}
</Link>
))}
</div>
</div>
<div className="hidden md:flex flex-1 max-w-md mx-8">
<SearchBar placeholder="Search or paste GitHub URL..." />
</div>
<AccountSwitcher />
</div>
</div>
</nav>
);
}