mirror of
https://github.com/getredash/redash.git
synced 2026-03-22 01:00:14 -04:00
* DynamicComponent for QuerySourceAlerts * General Settings updates * Dynamic Date[Range] updates * EmptyState updates * Query and SchemaBrowser updates * Adjust page headers and add disablePublish * Policy updates * Separate Home FavoritesList component * Update FormatQuery * Autolimit frontend fixes * Misc updates * Keep registering of QuerySourceDropdown * Undo changes in DynamicComponent * Change sql-formatter package.json syntax * Allow opening help trigger in new tab * Don't run npm commands as root in Dockerfile * Cypress: Remove extra execute query
42 lines
1.3 KiB
JavaScript
42 lines
1.3 KiB
JavaScript
import React, { useRef, useCallback } from "react";
|
|
import PropTypes from "prop-types";
|
|
import DynamicComponent from "@/components/DynamicComponent";
|
|
import DesktopNavbar from "./DesktopNavbar";
|
|
import MobileNavbar from "./MobileNavbar";
|
|
|
|
import "./index.less";
|
|
|
|
export default function ApplicationLayout({ children }) {
|
|
const mobileNavbarContainerRef = useRef();
|
|
|
|
const getMobileNavbarPopupContainer = useCallback(() => mobileNavbarContainerRef.current, []);
|
|
|
|
return (
|
|
<React.Fragment>
|
|
<DynamicComponent name="ApplicationWrapper">
|
|
<div className="application-layout-side-menu">
|
|
<DynamicComponent name="ApplicationDesktopNavbar">
|
|
<DesktopNavbar />
|
|
</DynamicComponent>
|
|
</div>
|
|
<div className="application-layout-content">
|
|
<nav className="application-layout-top-menu" ref={mobileNavbarContainerRef}>
|
|
<DynamicComponent name="ApplicationMobileNavbar" getPopupContainer={getMobileNavbarPopupContainer}>
|
|
<MobileNavbar getPopupContainer={getMobileNavbarPopupContainer} />
|
|
</DynamicComponent>
|
|
</nav>
|
|
{children}
|
|
</div>
|
|
</DynamicComponent>
|
|
</React.Fragment>
|
|
);
|
|
}
|
|
|
|
ApplicationLayout.propTypes = {
|
|
children: PropTypes.node,
|
|
};
|
|
|
|
ApplicationLayout.defaultProps = {
|
|
children: null,
|
|
};
|