2026-02-03 08:42:59 +00:00
|
|
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
|
|
|
import { Navbar } from './Navbar';
|
|
|
|
|
|
|
|
|
|
const meta: Meta<typeof Navbar> = {
|
2026-02-05 13:20:06 +00:00
|
|
|
title: 'App/Layouts/Navbar',
|
2026-02-03 08:42:59 +00:00
|
|
|
component: Navbar,
|
|
|
|
|
parameters: {
|
|
|
|
|
layout: 'fullscreen',
|
|
|
|
|
},
|
|
|
|
|
tags: ['autodocs'],
|
|
|
|
|
decorators: [
|
|
|
|
|
(Story) => (
|
2026-02-05 13:20:06 +00:00
|
|
|
<div className="min-h-layout-story bg-background">
|
refactor(storybook): remove duplicate providers from stories (Phase 2)
Stories no longer wrap with QueryClientProvider, ToastProvider,
ThemeProvider, or MemoryRouter; global StorybookDecorator provides them.
- Route-specific pages use parameters.router.initialEntries
(ResetPasswordPage, VerifyEmailPage) or minimal MemoryRouter+Route
where useParams is needed (TrackDetailPage, PlaylistDetailPage).
- Stories that seeded query cache use useQueryClient() from global
decorator (FollowButton, CollaboratorManagement, CommentSection).
- Navbar, AuthLayout, DashboardLayout, Header, and 25+ story files
simplified to layout divs only.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-05 12:08:17 +00:00
|
|
|
<Story />
|
|
|
|
|
</div>
|
2026-02-03 08:42:59 +00:00
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
argTypes: {
|
|
|
|
|
onNavigate: { action: 'onNavigate' },
|
|
|
|
|
onLogout: { action: 'onLogout' },
|
|
|
|
|
},
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default meta;
|
|
|
|
|
type Story = StoryObj<typeof Navbar>;
|
|
|
|
|
|
|
|
|
|
export const Default: Story = {
|
|
|
|
|
args: {},
|
|
|
|
|
};
|