From 9a18cf2215b9cdffb95a505264ec9cb3144c322d Mon Sep 17 00:00:00 2001 From: abingyyds Date: Sat, 21 Mar 2026 09:06:35 +0900 Subject: [PATCH] chore: remove old dist-site Layout.jsx (replaced by themed templates) Co-Authored-By: Claude Opus 4.6 --- src/components/Layout.jsx | 171 -------------------------------------- 1 file changed, 171 deletions(-) delete mode 100644 src/components/Layout.jsx diff --git a/src/components/Layout.jsx b/src/components/Layout.jsx deleted file mode 100644 index 28a341c..0000000 --- a/src/components/Layout.jsx +++ /dev/null @@ -1,171 +0,0 @@ -import React, { useState } from 'react'; -import { Outlet, Link, useNavigate, useLocation } from 'react-router-dom'; -import { useAuth } from '../context/AuthContext'; -import { useSite } from '../context/SiteContext'; - -export default function Layout() { - const { user, logout } = useAuth(); - const { site } = useSite(); - const navigate = useNavigate(); - const location = useLocation(); - const [mobileMenuOpen, setMobileMenuOpen] = useState(false); - - const siteName = site?.name || 'AI Platform'; - - const navItems = [ - { to: '/', label: 'Home', auth: false }, - { to: '/pricing', label: 'Pricing', auth: false }, - { to: '/packages', label: 'Packages', auth: false }, - { to: '/dashboard', label: 'Dashboard', auth: true }, - { to: '/tokens', label: 'API Keys', auth: true }, - ]; - - const visibleNavItems = navItems.filter((n) => !n.auth || user); - - return ( -
- {/* Announcement Banner */} - {site?.announcement && ( -
-

{site.announcement}

-
- )} - - {/* Header */} -
-
- {/* Logo */} - - {site?.logo ? ( - {siteName} - ) : ( -
- {siteName.charAt(0)} -
- )} - - {siteName} - - - - {/* Desktop Nav */} - - - {/* Auth + Mobile toggle */} -
- {user ? ( -
- - {user.display_name || user.username} - - -
- ) : ( - <> - - Login - - - Sign Up - - - )} - - {/* Mobile hamburger */} - -
-
- - {/* Mobile Nav Dropdown */} - {mobileMenuOpen && ( -
- -
- )} -
- - {/* Content */} -
- -
- - {/* Footer */} -
-
-

- © {new Date().getFullYear()} {siteName}. -

-
- {site?.contact_email && ( - - Contact - - )} -
-
-
-
- ); -} - -function NavLink({ to, children, active }) { - return ( - - {children} - - ); -}