mirror of
https://git.mirrors.martin98.com/https://github.com/SigNoz/signoz
synced 2025-08-11 04:39:59 +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 history from 'lib/history';
|
||||
import React from 'react';
|
||||
import { useLocation } from 'react-router-dom';
|
||||
|
||||
import ShowBreadcrumbs from './Breadcrumbs';
|
||||
import DateTimeSelector from './DateTimeSelection';
|
||||
import { Container } from './styles';
|
||||
|
||||
const routesToSkip = [ROUTES.SETTINGS];
|
||||
|
||||
const TopNav = (): JSX.Element | null => {
|
||||
const { pathname } = useLocation();
|
||||
|
||||
if (history.location.pathname === ROUTES.SIGN_UP) {
|
||||
return null;
|
||||
}
|
||||
@ -18,9 +23,11 @@ const TopNav = (): JSX.Element | null => {
|
||||
<ShowBreadcrumbs />
|
||||
</Col>
|
||||
|
||||
<Col span={8}>
|
||||
<DateTimeSelector />
|
||||
</Col>
|
||||
{!routesToSkip.includes(pathname) && (
|
||||
<Col span={8}>
|
||||
<DateTimeSelector />
|
||||
</Col>
|
||||
)}
|
||||
</Container>
|
||||
);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user