tachybase_todo/packages/plugins/@tachybase/plugin-users/src/client/UsersManagement.tsx
sealday ede7ead8b1 chore(version): release v0.21.34 (#1045)
Co-authored-by: sealday <sealday@gmail.com>
Reviewed-on: daoyoucloud/tachybase#1045
2024-05-24 01:06:06 +08:00

27 lines
872 B
TypeScript

import React from 'react';
import { SchemaComponent, SchemaComponentContext, useSchemaComponentContext } from '@tachybase/client';
import { Card } from 'antd';
import { useFilterActionProps } from './hooks';
import { useUsersTranslation } from './locale';
import { PasswordField } from './PasswordField';
import { usersSchema } from './schemas/users';
import { UserRolesField } from './UserRolesField';
export const UsersManagement: React.FC = () => {
const { t } = useUsersTranslation();
const scCtx = useSchemaComponentContext();
return (
<SchemaComponentContext.Provider value={{ ...scCtx, designable: false }}>
<Card>
<SchemaComponent
schema={usersSchema}
scope={{ t, useFilterActionProps }}
components={{ UserRolesField, PasswordField }}
/>
</Card>
</SchemaComponentContext.Provider>
);
};