From 946a78a7efec03712515ed9157a25217d19b58e3 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Wed, 20 Jul 2022 16:07:08 +0700 Subject: [PATCH 1/2] fixed deactivated unit color --- src/components/comment/CommentAvatar/index.tsx | 4 +--- src/containers/profile/ProfileQuickInfo/index.tsx | 2 +- src/containers/profile/ProfileQuickInfo/styles.module.scss | 3 +++ 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/comment/CommentAvatar/index.tsx b/src/components/comment/CommentAvatar/index.tsx index 2ca7dc60..abeddbb5 100644 --- a/src/components/comment/CommentAvatar/index.tsx +++ b/src/components/comment/CommentAvatar/index.tsx @@ -1,6 +1,4 @@ -import React, { FC, useCallback, useState } from 'react'; - -import { Manager, Popper, Reference } from 'react-popper'; +import React, { FC } from 'react'; import { Avatar } from '~/components/common/Avatar'; import { MenuButton } from '~/components/menu'; diff --git a/src/containers/profile/ProfileQuickInfo/index.tsx b/src/containers/profile/ProfileQuickInfo/index.tsx index 799bf4cd..251cecce 100644 --- a/src/containers/profile/ProfileQuickInfo/index.tsx +++ b/src/containers/profile/ProfileQuickInfo/index.tsx @@ -34,7 +34,7 @@ const ProfileQuickInfo: FC = ({ user }) => {
~{user.username}
- {isActive ? 'в сознании' : 'деактивирован'} + {isActive ? 'юнит в сознании' : 'юнит деактивирован'}
diff --git a/src/containers/profile/ProfileQuickInfo/styles.module.scss b/src/containers/profile/ProfileQuickInfo/styles.module.scss index e1368da5..70d3e8f7 100644 --- a/src/containers/profile/ProfileQuickInfo/styles.module.scss +++ b/src/containers/profile/ProfileQuickInfo/styles.module.scss @@ -24,15 +24,18 @@ div.top.top { .username { font: $font_12_regular; opacity: 0.5; + text-transform: lowercase; } .fullname { margin-bottom: 3px; + text-transform: capitalize; } .status { font: $font_12_regular; margin-top: $gap; + color: darken(white, 50%); &.active { color: $olive; From bdf803a70cfb455e78469efb55bc4a3f1f3b92d4 Mon Sep 17 00:00:00 2001 From: Fedor Katurov Date: Wed, 20 Jul 2022 16:10:05 +0700 Subject: [PATCH 2/2] optimized imports --- public/images/muro_is_lost.svg | 24 +++++++++---------- .../charts/StatsCountdownCard/index.tsx | 8 +------ .../comment/CommentContent/index.tsx | 11 +-------- .../comment/CommentDistance/index.tsx | 2 +- src/components/comment/CommentForm/index.tsx | 1 - src/components/common/Avatar/index.tsx | 3 +-- src/components/input/InputText/index.tsx | 1 - src/components/input/Textarea/index.tsx | 2 +- src/components/lab/LabHead/index.tsx | 2 -- src/components/node/NodeEditMenu/index.tsx | 1 - src/components/sidebar/SidebarStack/index.tsx | 10 +------- .../sortable/SortableAudioGrid/index.tsx | 2 +- .../sortable/SortableImageGrid/index.tsx | 2 +- src/containers/lab/LabGrid/index.tsx | 2 -- .../profile/ProfileQuickInfo/index.tsx | 6 +---- .../profile/ProfileSidebarMenu/index.tsx | 3 --- .../settings/SettingsNotes/index.tsx | 6 ----- src/hooks/color/useColorGradientFromString.ts | 5 +--- src/hooks/comments/useNodeComments.ts | 13 ++++++---- src/hooks/notes/useGetNotes.ts | 5 +--- src/layouts/LabLayout/index.tsx | 2 -- src/types/lab/index.ts | 2 +- 22 files changed, 33 insertions(+), 80 deletions(-) diff --git a/public/images/muro_is_lost.svg b/public/images/muro_is_lost.svg index be52b796..f8c57bc0 100644 --- a/public/images/muro_is_lost.svg +++ b/public/images/muro_is_lost.svg @@ -2,18 +2,18 @@ + width="1920" + height="1080" + viewBox="0 0 507.99999 285.75001" + version="1.1" + id="svg5" + sodipodi:docname="muro_is_lost.svg" + inkscape:version="1.2-dev (9ee32be, 2021-06-19)" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns="http://www.w3.org/2000/svg" +> { - const { comments, isLoading, onLoadMoreComments, hasMore, data, mutate, isLoadingMore } = useGetComments( - nodeId, - fallbackData - ); + const { + comments, + isLoading, + onLoadMoreComments, + hasMore, + data, + mutate, + isLoadingMore, + } = useGetComments(nodeId, fallbackData); const onDelete = useCallback( async (id: IComment['id'], isLocked: boolean) => { diff --git a/src/hooks/notes/useGetNotes.ts b/src/hooks/notes/useGetNotes.ts index 2ff6cf73..072ba34f 100644 --- a/src/hooks/notes/useGetNotes.ts +++ b/src/hooks/notes/useGetNotes.ts @@ -1,13 +1,10 @@ import { useCallback, useMemo } from 'react'; import useSWRInfinite, { SWRInfiniteKeyLoader } from 'swr/infinite'; - -import { getLabNodes } from '~/api/lab'; import { apiGetNotes } from '~/api/notes'; import { ApiGetNotesRequest } from '~/api/notes/types'; import { useAuth } from '~/hooks/auth/useAuth'; -import { useUser } from '~/hooks/auth/useUser'; -import { GetLabNodesRequest, ILabNode, LabNodesSort } from '~/types/lab'; +import { GetLabNodesRequest, ILabNode } from '~/types/lab'; import { flatten, uniqBy } from '~/utils/ramda'; const DEFAULT_COUNT = 20; diff --git a/src/layouts/LabLayout/index.tsx b/src/layouts/LabLayout/index.tsx index 939529fa..bc9729dd 100644 --- a/src/layouts/LabLayout/index.tsx +++ b/src/layouts/LabLayout/index.tsx @@ -1,6 +1,4 @@ import React, { FC } from 'react'; - -import { Superpower } from '~/components/boris/Superpower'; import { Group } from '~/components/containers/Group'; import { Sticky } from '~/components/containers/Sticky'; import { LabHead } from '~/components/lab/LabHead'; diff --git a/src/types/lab/index.ts b/src/types/lab/index.ts index 9d120d66..f4f3653c 100644 --- a/src/types/lab/index.ts +++ b/src/types/lab/index.ts @@ -1,4 +1,4 @@ -import { IError, INode, ITag } from '~/types'; +import { INode, ITag } from '~/types'; export enum LabNodesSort { New = 'new',