mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-21 01:16:57 +00:00
* fix(FE): eslint * chore: run eslint on frontend folder * chore: run eslint on src * chore: eslint fixing is updated * chore: linting errors are updated Co-authored-by: Nidhi Tandon <nidhitandon08@gmail.com>
40 lines
930 B
TypeScript
40 lines
930 B
TypeScript
import { Layout } from 'antd';
|
|
import React, { ReactNode, useEffect } from 'react';
|
|
import { useLocation } from 'react-router-dom';
|
|
|
|
import SideNav from './Nav/SideNav';
|
|
import TopNav from './Nav/TopNav';
|
|
import { useRoute } from './RouteProvider';
|
|
|
|
const { Content, Footer } = Layout;
|
|
|
|
interface BaseLayoutProps {
|
|
children: ReactNode;
|
|
}
|
|
|
|
const BaseLayout: React.FC<BaseLayoutProps> = ({ children }) => {
|
|
const location = useLocation();
|
|
const { dispatch } = useRoute();
|
|
|
|
useEffect(() => {
|
|
dispatch({ type: 'ROUTE_IS_LOADED', payload: location.pathname });
|
|
}, [location]);
|
|
|
|
return (
|
|
<Layout style={{ minHeight: '100vh' }}>
|
|
<SideNav />
|
|
<Layout className="site-layout">
|
|
<Content style={{ margin: '0 16px' }}>
|
|
<TopNav />
|
|
{children}
|
|
</Content>
|
|
<Footer style={{ textAlign: 'center', fontSize: 10 }}>
|
|
SigNoz Inc. ©2020
|
|
</Footer>
|
|
</Layout>
|
|
</Layout>
|
|
);
|
|
};
|
|
|
|
export default BaseLayout;
|