mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-14 21:15:53 +08:00
* fix(FE): removed time filter from settings page #374 * declared an array consisting of routes,in which we won't have to render time filter component Co-authored-by: Mohmin2 <mohmin@expansionjs.com>
This commit is contained in:
parent
8f2ed0e46f
commit
5e828bf174
@ -2,12 +2,17 @@ import { Col } from 'antd';
|
|||||||
import ROUTES from 'constants/routes';
|
import ROUTES from 'constants/routes';
|
||||||
import history from 'lib/history';
|
import history from 'lib/history';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import { useLocation } from 'react-router-dom';
|
||||||
|
|
||||||
import ShowBreadcrumbs from './Breadcrumbs';
|
import ShowBreadcrumbs from './Breadcrumbs';
|
||||||
import DateTimeSelector from './DateTimeSelection';
|
import DateTimeSelector from './DateTimeSelection';
|
||||||
import { Container } from './styles';
|
import { Container } from './styles';
|
||||||
|
|
||||||
|
const routesToSkip = [ROUTES.SETTINGS];
|
||||||
|
|
||||||
const TopNav = (): JSX.Element | null => {
|
const TopNav = (): JSX.Element | null => {
|
||||||
|
const { pathname } = useLocation();
|
||||||
|
|
||||||
if (history.location.pathname === ROUTES.SIGN_UP) {
|
if (history.location.pathname === ROUTES.SIGN_UP) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@ -18,9 +23,11 @@ const TopNav = (): JSX.Element | null => {
|
|||||||
<ShowBreadcrumbs />
|
<ShowBreadcrumbs />
|
||||||
</Col>
|
</Col>
|
||||||
|
|
||||||
|
{!routesToSkip.includes(pathname) && (
|
||||||
<Col span={8}>
|
<Col span={8}>
|
||||||
<DateTimeSelector />
|
<DateTimeSelector />
|
||||||
</Col>
|
</Col>
|
||||||
|
)}
|
||||||
</Container>
|
</Container>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user