fix: resolve typescript type narrowing compiler errors in dynamic header actions
This commit is contained in:
parent
a4676224f1
commit
59ba358782
1 changed files with 14 additions and 20 deletions
10
src/App.tsx
10
src/App.tsx
|
|
@ -805,6 +805,7 @@ export default function App() {
|
|||
return (
|
||||
<>
|
||||
{/* Dynamic Header */}
|
||||
{currentPage !== 'dashboard' && (
|
||||
<nav className="w-full top-0 sticky z-50 bg-white border-b border-[#D9C5B2] transition-all duration-300">
|
||||
<div className="flex justify-between items-center max-w-7xl mx-auto px-8 py-4">
|
||||
<button className="font-caslon text-2xl font-bold text-primary bg-transparent border-none cursor-pointer" onClick={() => navigateTo('home')}>
|
||||
|
|
@ -819,12 +820,6 @@ export default function App() {
|
|||
</div>
|
||||
|
||||
<div className="flex items-center gap-4 text-sm font-semibold">
|
||||
{currentPage === 'dashboard' ? (
|
||||
<button className="text-secondary hover:text-primary bg-transparent border-none cursor-pointer" onClick={handleLogout}>
|
||||
Logout
|
||||
</button>
|
||||
) : (
|
||||
<>
|
||||
<button
|
||||
className="text-secondary hover:text-primary bg-transparent border-none cursor-pointer"
|
||||
onClick={() => { setActiveTab('login'); navigateTo('login'); }}
|
||||
|
|
@ -837,11 +832,10 @@ export default function App() {
|
|||
>
|
||||
Get Started
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
)}
|
||||
{/* Main Content Area */}
|
||||
{currentPage !== 'dashboard' ? (
|
||||
<main className={`main-content ${currentPage === 'home' ? 'full-width' : ''}`}>
|
||||
|
|
|
|||
Loading…
Reference in a new issue