palash-signoz 01bad0f18a
chore: eslint fix (#884)
* chore: eslint is updated

* chore: some eslint fixes are made

* chore: some more eslint fix are updated

* chore: some eslint fix is made

* chore: styled components type is added

* chore: some more eslint fix are made

* chore: some more eslint fix are updated

* chore: some more eslint fix are updated

* fix: eslint fixes

Co-authored-by: Pranshu Chittora <pranshu@signoz.io>
2022-03-24 12:06:57 +05:30

37 lines
875 B
TypeScript

/* eslint-disable react/no-unstable-nested-components */
import RouteTab from 'components/RouteTab';
import ROUTES from 'constants/routes';
import CreateAlertChannels from 'container/CreateAlertChannels';
import GeneralSettings from 'container/GeneralSettings';
import history from 'lib/history';
import React from 'react';
function SettingsPage(): JSX.Element {
const pathName = history.location.pathname;
return (
<RouteTab
{...{
routes: [
{
Component: GeneralSettings,
name: 'General Settings',
route: ROUTES.SETTINGS,
},
{
Component: (): JSX.Element => {
return <CreateAlertChannels />;
},
name: 'Alert Channels',
route: ROUTES.ALL_CHANNELS,
},
],
activeKey:
pathName === ROUTES.SETTINGS ? 'General Settings' : 'Alert Channels',
}}
/>
);
}
export default SettingsPage;