feat: replace title with banner image in mobile header and main layout

This commit is contained in:
Wikid82
2025-11-26 03:19:12 +00:00
parent f811983473
commit e459978797
2 changed files with 6 additions and 4 deletions

View File

@@ -74,7 +74,7 @@ export default function Layout({ children }: LayoutProps) {
<div className="min-h-screen bg-light-bg dark:bg-dark-bg flex transition-colors duration-200">
{/* Mobile Header */}
<div className="lg:hidden fixed top-0 left-0 right-0 h-16 bg-white dark:bg-dark-sidebar border-b border-gray-200 dark:border-gray-800 flex items-center justify-between px-4 z-40">
<h1 className="text-lg font-bold text-gray-900 dark:text-white">CPM+</h1>
<img src="/banner.png" alt="CPM+" className="h-8 w-auto" />
<div className="flex items-center gap-2">
<NotificationCenter />
<ThemeToggle />
@@ -253,7 +253,7 @@ export default function Layout({ children }: LayoutProps) {
</button>
</div>
<div className="absolute left-1/2 top-1/2 transform -translate-x-1/2 -translate-y-1/2">
<h1 className="text-xl font-bold text-gray-900 dark:text-white">CPM+</h1>
<img src="/banner.png" alt="CPM+" className="h-8 w-auto" />
</div>
<div className="w-1/3 flex justify-end items-center gap-4">
{user && (

View File

@@ -44,14 +44,16 @@ const renderWithProviders = (children: ReactNode) => {
}
describe('Layout', () => {
it('renders the application title', () => {
it('renders the application logo', () => {
renderWithProviders(
<Layout>
<div>Test Content</div>
</Layout>
)
expect(screen.getAllByText('CPM+')[0]).toBeInTheDocument()
const logos = screen.getAllByAltText('CPM+')
expect(logos.length).toBeGreaterThan(0)
expect(logos[0]).toBeInTheDocument()
})
it('renders all navigation items', () => {