2023-09-27 02:07:40 -04:00
|
|
|
import React, { FC, useEffect } from 'react';
|
2023-04-26 09:50:48 -04:00
|
|
|
|
2023-09-27 02:07:40 -04:00
|
|
|
interface AppHeaderParams {
|
|
|
|
isHidden?: boolean
|
|
|
|
}
|
|
|
|
|
|
|
|
const AppHeader: FC<AppHeaderParams> = ({
|
|
|
|
isHidden = false
|
|
|
|
}) => {
|
2023-04-26 09:50:48 -04:00
|
|
|
useEffect(() => {
|
|
|
|
// Initialize the UI components after first render
|
2025-01-14 05:16:44 +11:00
|
|
|
void import('../scripts/libraryMenu');
|
2023-04-26 09:50:48 -04:00
|
|
|
}, []);
|
|
|
|
|
|
|
|
return (
|
2023-09-27 02:07:40 -04:00
|
|
|
/**
|
|
|
|
* NOTE: These components are not used with the new layouts, but legacy views interact with the elements
|
|
|
|
* directly so they need to be present in the DOM. We use display: none to hide them and prevent errors.
|
|
|
|
*/
|
|
|
|
<div style={isHidden ? { display: 'none' } : undefined}>
|
2023-04-26 09:50:48 -04:00
|
|
|
<div className='mainDrawer hide'>
|
|
|
|
<div className='mainDrawer-scrollContainer scrollContainer focuscontainer-y' />
|
|
|
|
</div>
|
|
|
|
<div className='skinHeader focuscontainer-x' />
|
|
|
|
<div className='mainDrawerHandle' />
|
2023-09-27 02:07:40 -04:00
|
|
|
</div>
|
2023-04-26 09:50:48 -04:00
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default AppHeader;
|