tachybase_todo/packages/plugins/verification/src/client/index.tsx

42 lines
1.0 KiB
TypeScript
Raw Normal View History

import React, { useContext } from 'react';
import { PluginManagerContext, SettingsCenterProvider } from '@nocobase/client';
import { NAMESPACE } from './locale';
import { VerificationProviders } from './VerificationProviders';
export { default as verificationProviderTypes } from './providerTypes';
export default function(props) {
const ctx = useContext(PluginManagerContext);
return (
<SettingsCenterProvider
settings={{
verification: {
icon: 'CheckCircleOutlined',
title: `{{t("Verification", { ns: "${NAMESPACE}" })}}`,
tabs: {
providers: {
title: `{{t("Verification providers", { ns: "${NAMESPACE}" })}}`,
component: VerificationProviders,
},
},
},
}}
>
<PluginManagerContext.Provider
value={{
components: {
...ctx?.components,
},
}}
>
{props.children}
</PluginManagerContext.Provider>
</SettingsCenterProvider>
);
};