2022-06-20 09:50:40 +00:00
|
|
|
import React, { Fragment } from 'react';
|
2022-06-20 14:53:19 +00:00
|
|
|
import { useSelector } from 'react-redux';
|
|
|
|
|
|
|
|
|
2022-07-18 13:16:08 +00:00
|
|
|
const BottomSheetContainer: () => JSX.Element|null = (): JSX.Element|null => {
|
|
|
|
const { sheet, sheetProps } = useSelector((state: any) => state['features/base/dialog']);
|
|
|
|
const { reducedUI } = useSelector((state: any) => state['features/base/responsive-ui']);
|
2022-06-20 14:53:19 +00:00
|
|
|
|
|
|
|
if (!sheet || reducedUI) {
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
return (
|
2022-06-20 09:50:40 +00:00
|
|
|
<Fragment>
|
2022-06-20 14:53:19 +00:00
|
|
|
{ React.createElement(sheet, sheetProps) }
|
2022-06-20 09:50:40 +00:00
|
|
|
</Fragment>
|
2022-06-20 14:53:19 +00:00
|
|
|
);
|
2022-07-11 12:30:37 +00:00
|
|
|
};
|
2022-06-20 14:53:19 +00:00
|
|
|
|
|
|
|
export default BottomSheetContainer;
|