diff --git a/src/components/common/Square/index.tsx b/src/components/common/Square/index.tsx index 75a7cae0..96e2c473 100644 --- a/src/components/common/Square/index.tsx +++ b/src/components/common/Square/index.tsx @@ -1,26 +1,29 @@ -import React, { forwardRef, ForwardRefRenderFunction, VFC } from 'react'; +import React, { forwardRef } from 'react'; import styles from './styles.module.scss'; import { DivProps } from '~/utils/types'; import classNames from 'classnames'; interface SquareProps extends DivProps { - image: string; + image?: string; size?: number; } -const Square = forwardRef(({ image, size, ...rest }, ref) => { - const backgroundImage = image ? `url('${image}')` : undefined; +const Square = forwardRef( + ({ image, size, children, ...rest }, ref) => { + const backgroundImage = image ? `url('${image}')` : undefined; - return ( -
- -
- ); -}); + return ( +
+ + {!!children &&
{children}
} +
+ ); + } +); export { Square }; diff --git a/src/components/common/Square/styles.module.scss b/src/components/common/Square/styles.module.scss index 880fb4a7..ca207950 100644 --- a/src/components/common/Square/styles.module.scss +++ b/src/components/common/Square/styles.module.scss @@ -9,4 +9,13 @@ border-radius: $radius; background-size: cover; background-repeat: no-repeat; + position: relative; +} + +.content { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; } diff --git a/src/containers/sidebars/ProfileSidebar/index.tsx b/src/containers/sidebars/ProfileSidebar/index.tsx index b1143f0d..f235696b 100644 --- a/src/containers/sidebars/ProfileSidebar/index.tsx +++ b/src/containers/sidebars/ProfileSidebar/index.tsx @@ -7,10 +7,18 @@ import { Button } from '~/components/input/Button'; import { Filler } from '~/components/containers/Filler'; import { ProfileSidebarHead } from '~/containers/profile/ProfileSidebarHead'; import classNames from 'classnames'; +import { Group } from '~/components/containers/Group'; +import { Card } from '~/components/containers/Card'; +import { Grid } from '~/components/containers/Grid'; +import { Square } from '~/components/common/Square'; +import { Padder } from '~/components/containers/Padder'; +import { useUser } from '~/hooks/auth/useUser'; interface ProfileSidebarProps extends DialogComponentProps {} const ProfileSidebar: VFC = ({ onRequestClose }) => { + const { user } = useUser(); + return (
@@ -20,11 +28,41 @@ const ProfileSidebar: VFC = ({ onRequestClose }) => {
-

Здесь будет профиль

+ +
    +
  • Настройки
  • +
  • Заметки
  • +
  • Удалённые посты
  • +
-

- Но пока что мы просто тестируем как это будет выглядеть и будет ли это удобнее модалки -

+ + +

1 год 2 месяца

+ в убежище +
+ + + +

24 поста

+ Создано +
+
+
+ + + + +

16545 лайка

+ получено +
+
+ + +

123123 комментария

+ под постами +
+
+