Files
taxbaik/TaxBaik.Web/Components/Admin/Pages/Logout.razor
T
kjh2064 ad48befb9a
TaxBaik CI/CD / build-and-deploy (push) Successful in 1m17s
fix: logout, accordion, and drawer interactivity issues
**Issues Fixed:**

1.  Logout not working
   - Created Logout.razor page (was missing)
   - Properly calls AuthStateProvider.LogoutAsync()
   - Redirects to login page with forceLoad: true
   - Button click now triggers async logout flow

2.  Accordion state not persisting
   - Changed MudNavGroup from fixed Expanded=true/false
   - to @bind-Expanded data binding
   - Now properly toggles between expanded/collapsed
   - State persists across clicks
   - Added expandedCustomerGroup, expandedWebsiteGroup properties

3.  Drawer responsiveness
   - Already working with @bind-open="@drawerOpen"
   - ToggleDrawer() properly toggles state
   - Responsive behavior controlled via Breakpoint.Md

**Implementation:**
- Logout.razor: New page for async logout
  - Calls AuthStateProvider.LogoutAsync()
  - Clears TokenStore + localStorage
  - Redirects to /admin/login

- MainLayout.razor: Accordion interactivity
  - @bind-Expanded replaces hardcoded Expanded properties
  - Each group has independent state variable
  - Click properly toggles group expansion

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-28 12:58:27 +09:00

18 lines
480 B
Plaintext

@page "/admin/logout"
@using TaxBaik.Web.Services
@inject CustomAuthenticationStateProvider AuthStateProvider
@inject NavigationManager NavigationManager
<PageTitle>로그아웃</PageTitle>
@code {
protected override async Task OnInitializedAsync()
{
// 사용자 로그아웃
await AuthStateProvider.LogoutAsync();
// 로그인 페이지로 리다이렉트
NavigationManager.NavigateTo("/taxbaik/admin/login", forceLoad: true);
}
}