refactor(profile): update error display to use Empty component
Signed-off-by: Noa Virellia <noa@requiem.garden>
This commit is contained in:
@@ -65,7 +65,7 @@ export const Primary: Story = {
|
||||
};
|
||||
|
||||
export const Empty: Story = {
|
||||
decorators: [Story => <div className="h-screen">{Story()}</div>],
|
||||
decorators: [Story => <div className="h-screen"><Story /></div>],
|
||||
args: {
|
||||
events: [],
|
||||
footer: () => <Button className="w-full">加入活动</Button>,
|
||||
|
||||
@@ -39,10 +39,20 @@ export const Loading: Story = {
|
||||
|
||||
export const Error: Story = {
|
||||
render: () => <ProfileError reason="用户个人资料未公开" />,
|
||||
decorators: [
|
||||
Story => (
|
||||
<div className="h-screen">
|
||||
<Story />
|
||||
</div>
|
||||
),
|
||||
],
|
||||
args: {
|
||||
user: {
|
||||
allow_public: false,
|
||||
},
|
||||
onSaveBio: async () => Promise.resolve(),
|
||||
},
|
||||
parameters: {
|
||||
layout: 'fullscreen',
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user