import React, { FC, LegacyRef, ReactChild, useCallback, useEffect, useState } from 'react'; import classNames from 'classnames'; import styles from './styles.module.scss'; import { Group } from '~/components/containers/Group'; interface IProps { } export const SidePane: FC = ({ }) => { const content_width = 1100; const [left, setLeft] = useState(0); const moveThis = useCallback(() => { const { width } = document.body.getBoundingClientRect(); const shift = width > (content_width + 64 + 20) ? ((width - content_width - 64 - 20) / 2) - 54 + 64 // + content_width + 74 : 10; setLeft(shift); }, [setLeft]); useEffect(() => { moveThis(); window.addEventListener('resize', moveThis); document.addEventListener('DOMContentLoaded', moveThis); return () => { window.removeEventListener('resize', moveThis); document.removeEventListener('DOMContentLoaded', moveThis); }; }, [moveThis]); return (
V
P
F
S
); };