Skip to content

Commit

Permalink
fix(app): fix terminal errors
Browse files Browse the repository at this point in the history
  • Loading branch information
leineveber authored and Rozhkow committed Dec 5, 2023
1 parent 925a2c3 commit e7d8411
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
8 changes: 5 additions & 3 deletions src/components/common/BaseCheckbox/BaseCheckbox.tsx
Original file line number Diff line number Diff line change
@@ -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<HTMLInputElement, BaseCheckboxProps>((props, ref) => {
const Checkbox = React.forwardRef<BaseCheckboxRef, BaseCheckboxProps>((props, ref) => {
return <S.Checkbox {...props} ref={ref} />;
});

Expand All @@ -16,4 +18,4 @@ interface BaseCheckboxInterface extends CheckboxForwardRef {

export const BaseCheckbox = Checkbox as BaseCheckboxInterface;

BaseCheckbox.Group = S.CheckboxGroup;
BaseCheckbox.Group = S.CheckboxGroup;
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/modalController.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const modalRender = (node: React.ReactNode) => <ModalStyles>{node}</ModalStyles>

type IconType = 'info' | 'success' | 'warning' | 'error';

type ModalType = Pick<ModalStaticFunctions, IconType>;
export type ModalType = Pick<ModalStaticFunctions, IconType>;

const open = (type: IconType, modal: ModalType): ModalType[IconType] => {
const Icon = Icons[type];
Expand Down
7 changes: 4 additions & 3 deletions src/hooks/useFeedback.ts
Original file line number Diff line number Diff line change
@@ -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<typeof App.useApp> => {
export const useFeedback = (): Omit<ReturnType<typeof App.useApp>, 'modal'> & {
modal: ModalType;
} => {
const { message, notification, modal } = App.useApp();

return {
Expand All @@ -15,7 +17,6 @@ export const useFeedback = (): ReturnType<typeof App.useApp> => {
},
modal: {
...modalController(modal),
confirm: modal.confirm,
},
};
};
2 changes: 1 addition & 1 deletion src/styles/GlobalStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down

0 comments on commit e7d8411

Please sign in to comment.