veza/apps/web/src/features/profile/pages/UserProfilePage.stories.tsx
senke a51f67a843 style(social): elevate Profile + GroupDetailView to SaaS Premium
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-07 14:15:35 +01:00

43 lines
1.2 KiB
TypeScript

import type { Meta, StoryObj } from '@storybook/react';
import { MemoryRouter, Route, Routes } from 'react-router-dom';
import { UserProfilePage } from './UserProfilePage';
import { UserProfilePageSkeleton } from './user-profile-page';
const meta: Meta<typeof UserProfilePage> = {
title: 'App/Pages/Profile/UserProfilePage',
component: UserProfilePage,
parameters: { layout: 'fullscreen' },
tags: ['autodocs'],
decorators: [
(Story, context) => {
const initialEntries = context.parameters.initialEntries ?? ['/u/demo'];
return (
<div className="bg-background min-h-screen">
<MemoryRouter initialEntries={initialEntries}>
<Routes>
<Route path="/u/:username" element={<Story />} />
</Routes>
</MemoryRouter>
</div>
);
},
],
};
export default meta;
type Story = StoryObj<typeof meta>;
export const Default: Story = {
name: 'Par défaut',
parameters: { initialEntries: ['/u/demo'] },
};
export const Loading: Story = {
name: 'Chargement',
render: () => <UserProfilePageSkeleton />,
};
export const NotFound: Story = {
name: 'Non trouvé',
parameters: { initialEntries: ['/u/notfound'] },
};