import React from 'react'; import { Outlet, useLocation } from 'react-router-dom'; import { TabBar } from '../components/TabBar'; // Import pages for "Main Tab Persistent Mounting" pattern import { HomePage } from './HomePage'; import { MePage } from './MePage'; import { MessagePage } from './MessagePage'; import { ShopPage } from './ShopPage'; export const Layout: React.FC = () => { const { pathname } = useLocation(); // Define which paths correspond to main tabs that should be kept alive const isMainTab = ['/', '/market', '/message', '/me'].includes(pathname); // Hide TabBar on detail pages or publish page if needed, // but usually in RedBook detail page hides it. // We'll show TabBar only on main tabs. const showTabBar = isMainTab; return (