refactor(sidebar): split nav views and add router decorator
Signed-off-by: Noa Virellia <noa@requiem.garden>
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { Meta, StoryObj } from '@storybook/react-vite';
|
||||
import { EditProfileDialogView } from '@/components/profile/edit-profile.dialog.view';
|
||||
import { user } from '../exampleUser';
|
||||
|
||||
const meta = {
|
||||
title: 'Profile/EditDialog',
|
||||
@@ -27,14 +28,7 @@ type Story = StoryObj<typeof meta>;
|
||||
|
||||
export const Primary: Story = {
|
||||
args: {
|
||||
user: {
|
||||
username: 'nvirellia',
|
||||
nickname: 'Noa Virellia',
|
||||
subtitle: '天生骄傲',
|
||||
email: 'noa@requiem.garden',
|
||||
bio: '',
|
||||
avatar: 'https://avatars.githubusercontent.com/u/54884471?v=4',
|
||||
},
|
||||
user,
|
||||
updateProfile: async () => { },
|
||||
},
|
||||
parameters: {
|
||||
|
||||
@@ -3,6 +3,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { ProfileError } from '@/components/profile/profile.error';
|
||||
import { ProfileSkeleton } from '@/components/profile/profile.skeleton';
|
||||
import { ProfileView } from '@/components/profile/profile.view';
|
||||
import { user } from '../exampleUser';
|
||||
|
||||
const queryClient = new QueryClient();
|
||||
|
||||
@@ -23,20 +24,12 @@ type Story = StoryObj<typeof meta>;
|
||||
|
||||
export const Primary: Story = {
|
||||
args: {
|
||||
user: {
|
||||
username: 'nvirellia',
|
||||
nickname: 'Noa Virellia',
|
||||
subtitle: '天生骄傲',
|
||||
email: 'noa@requiem.garden',
|
||||
bio: '',
|
||||
avatar: 'https://avatars.githubusercontent.com/u/54884471?v=4',
|
||||
},
|
||||
user,
|
||||
onSaveBio: async () => Promise.resolve(),
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
export const Skeleton: Story = {
|
||||
export const Loading: Story = {
|
||||
render: () => <ProfileSkeleton />,
|
||||
args: {
|
||||
user: {},
|
||||
|
||||
Reference in New Issue
Block a user