From e7d8411519259bd96d4d3573773d428ddc82d65c Mon Sep 17 00:00:00 2001 From: leineveber Date: Fri, 1 Dec 2023 17:15:54 +0300 Subject: [PATCH] fix(app): fix terminal errors --- src/components/common/BaseCheckbox/BaseCheckbox.tsx | 8 +++++--- .../layouts/main/sider/MainSider/MainSider.styles.ts | 2 +- src/controllers/modalController.tsx | 2 +- src/hooks/useFeedback.ts | 7 ++++--- src/styles/GlobalStyle.ts | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/components/common/BaseCheckbox/BaseCheckbox.tsx b/src/components/common/BaseCheckbox/BaseCheckbox.tsx index 8abbc528..896d9245 100644 --- a/src/components/common/BaseCheckbox/BaseCheckbox.tsx +++ b/src/components/common/BaseCheckbox/BaseCheckbox.tsx @@ -1,10 +1,12 @@ import React from 'react'; -import { CheckboxProps } from 'antd'; +import { CheckboxProps, CheckboxRef } from 'antd'; import * as S from './BaseCheckbox.styles'; +export type BaseCheckboxRef = CheckboxRef; + export type BaseCheckboxProps = CheckboxProps; -const Checkbox = React.forwardRef((props, ref) => { +const Checkbox = React.forwardRef((props, ref) => { return ; }); @@ -16,4 +18,4 @@ interface BaseCheckboxInterface extends CheckboxForwardRef { export const BaseCheckbox = Checkbox as BaseCheckboxInterface; -BaseCheckbox.Group = S.CheckboxGroup; \ No newline at end of file +BaseCheckbox.Group = S.CheckboxGroup; diff --git a/src/components/layouts/main/sider/MainSider/MainSider.styles.ts b/src/components/layouts/main/sider/MainSider/MainSider.styles.ts index f2197bf3..6cdf9908 100644 --- a/src/components/layouts/main/sider/MainSider/MainSider.styles.ts +++ b/src/components/layouts/main/sider/MainSider/MainSider.styles.ts @@ -20,7 +20,7 @@ export const Sider = styled(BaseLayout.Sider)` &.ant-layout-sider { position: fixed; - background: ${(({ theme }) => theme.layoutSiderBg)}; + background: ${({ theme }) => theme.layoutSiderBg}; @media only screen and (${media('xl')}) { position: unset; diff --git a/src/controllers/modalController.tsx b/src/controllers/modalController.tsx index 4f8feb98..119633c3 100644 --- a/src/controllers/modalController.tsx +++ b/src/controllers/modalController.tsx @@ -49,7 +49,7 @@ const modalRender = (node: React.ReactNode) => {node} type IconType = 'info' | 'success' | 'warning' | 'error'; -type ModalType = Pick; +export type ModalType = Pick; const open = (type: IconType, modal: ModalType): ModalType[IconType] => { const Icon = Icons[type]; diff --git a/src/hooks/useFeedback.ts b/src/hooks/useFeedback.ts index f57be384..08380c19 100644 --- a/src/hooks/useFeedback.ts +++ b/src/hooks/useFeedback.ts @@ -1,9 +1,11 @@ import { App } from 'antd'; import { notificationController } from '@app/controllers/notificationController'; -import { modalController } from '@app/controllers/modalController'; +import { ModalType, modalController } from '@app/controllers/modalController'; -export const useFeedback = (): ReturnType => { +export const useFeedback = (): Omit, 'modal'> & { + modal: ModalType; +} => { const { message, notification, modal } = App.useApp(); return { @@ -15,7 +17,6 @@ export const useFeedback = (): ReturnType => { }, modal: { ...modalController(modal), - confirm: modal.confirm, }, }; }; diff --git a/src/styles/GlobalStyle.ts b/src/styles/GlobalStyle.ts index de0f88af..bdf38f39 100644 --- a/src/styles/GlobalStyle.ts +++ b/src/styles/GlobalStyle.ts @@ -24,7 +24,7 @@ export default styled.createGlobalStyle` a { font-size: ${({ theme }) => theme.fontSizes.md}; color: ${({ theme }) => theme.textMain}; - + &:hover, :active { color: ${({ theme }) => theme.primary6};