Storybook (#328)

* feat(docs): add interactive examples and API references for Button, Card, and LoadingFallback components
- Updated dependencies
- Set `retries` to a fixed value of 3 for consistent test retries across environments.
- Increased `timeout` from 60 seconds to 120 seconds to allow more time for tests to complete.
- Reduced `expect` timeout from 10 seconds to 5 seconds for quicker feedback on assertions.
This commit is contained in:
Giancarlo Buomprisco
2025-08-22 06:35:44 +07:00
committed by GitHub
parent 360ea30f4b
commit ad427365c9
87 changed files with 30102 additions and 431 deletions

View File

@@ -151,7 +151,7 @@ async function PersonalAccountPage(props: { account: Account }) {
<div className={'divider-divider-x flex flex-col gap-y-2.5'}>
<Heading level={6}>Teams</Heading>
<div>
<div className={'rounded-lg border p-2'}>
<AdminMembershipsTable memberships={memberships} />
</div>
</div>
@@ -216,7 +216,9 @@ async function TeamAccountPage(props: {
<div className={'flex flex-col gap-y-2.5'}>
<Heading level={6}>Team Members</Heading>
<AdminMembersTable members={members} />
<div className={'rounded-lg border p-2'}>
<AdminMembersTable members={members} />
</div>
</div>
</div>
</div>

View File

@@ -63,13 +63,15 @@ export function AdminAccountsTable(
<AccountsTableFilters filters={props.filters} />
</div>
<DataTable
pageSize={props.pageSize}
pageIndex={props.page - 1}
pageCount={props.pageCount}
data={props.data}
columns={getColumns()}
/>
<div className={'rounded-lg border p-2'}>
<DataTable
pageSize={props.pageSize}
pageIndex={props.page - 1}
pageCount={props.pageCount}
data={props.data}
columns={getColumns()}
/>
</div>
</div>
);
}

View File

@@ -2,6 +2,8 @@
import { useState, useTransition } from 'react';
import { isRedirectError } from 'next/dist/client/components/redirect-error';
import { zodResolver } from '@hookform/resolvers/zod';
import { useForm } from 'react-hook-form';
@@ -71,9 +73,14 @@ export function AdminDeleteUserDialog(
startTransition(async () => {
try {
await deleteUserAction(data);
setError(false);
} catch {
setError(true);
if (isRedirectError(error)) {
// Do nothing
} else {
setError(true);
}
}
});
})}