nocobase/packages/plugins/@nocobase/plugin-data-source-manager/src/client/component/BreadcumbTitle.tsx
2024-01-22 21:55:38 +08:00

23 lines
546 B
TypeScript

import React from 'react';
import { Breadcrumb } from 'antd';
import { Link, useParams } from 'react-router-dom';
import { useApp } from '@nocobase/client';
import { lang, NAMESPACE } from '../locale';
export const BreadcumbTitle = () => {
const app = useApp();
const { name } = useParams();
return (
<Breadcrumb
separator=">"
items={[
{ title: <Link to={app.pluginSettingsManager.getRoutePath(NAMESPACE)}>{lang('Data source manager')}</Link> },
{
title: name,
},
]}
/>
);
};