mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-29 16:14:42 +00:00
25 lines
509 B
TypeScript
25 lines
509 B
TypeScript
import { Button } from 'antd';
|
|
import ROUTES from 'constants/routes';
|
|
import React from 'react';
|
|
import { generatePath } from 'react-router-dom';
|
|
import history from 'lib/history';
|
|
import { Data } from '..';
|
|
|
|
const Name = (name: Data['name'], data: Data): JSX.Element => {
|
|
const onClickHandler = () => {
|
|
history.push(
|
|
generatePath(ROUTES.DASHBOARD, {
|
|
dashboardId: data.id,
|
|
}),
|
|
);
|
|
};
|
|
|
|
return (
|
|
<Button onClick={onClickHandler} type="link">
|
|
{name}
|
|
</Button>
|
|
);
|
|
};
|
|
|
|
export default Name;
|