Skip to content

Commit

Permalink
mr fixes #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ridel1e committed Nov 2, 2021
1 parent 92c087e commit 73502f8
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/components/common/ActionForm/ActionForm.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Form, FormInstance } from 'antd';
import React, { FC, ReactNode, useEffect, useState } from 'react';

import { useWallet } from '../../../context';
import { useConnection } from '../../../context/ConnectionContext';
import { Form, FormInstance } from '../../../ergodex-cdk';
import { ActionButton, ActionButtonState } from './ActionButton/ActionButton';

export interface ActionFormStrategy<T = any> {
Expand Down Expand Up @@ -65,7 +65,7 @@ export const ActionForm: FC<ActionFormProps> = ({
}
}, [online, ergBalance, isWalletConnected, strategy, form, formValueChanged]);

//TODO: REWRITE
// TODO: FIX_ACTION_FORM_CHANGE_TRIGGER[EDEX-471]
const onFormChange = () => setFormValueChanged({});

return (
Expand Down
2 changes: 1 addition & 1 deletion src/ergodex-cdk/components/Button/Button.less
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
}

.ant-btn.ant-btn-extra-lg {
border-radius: var(--ergo-border-radius-md);
height: 52px;
border-radius: var(--ergo-border-radius-md);
}

.ant-btn.ant-btn-sm, .ant-btn {
Expand Down
3 changes: 2 additions & 1 deletion src/ergodex-cdk/components/Form/Form.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { Form } from 'antd';
import { Form, FormInstance, FormItemProps, FormProps } from 'antd';

export { Form };
export type { FormInstance, FormItemProps, FormProps };
2 changes: 1 addition & 1 deletion src/pages/Swap/Swap.less
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
.swap-button {
position: relative;
z-index: 1;

button {
position: absolute;
z-index: 1;
top: 50%;
left: 50%;
transform: rotate(-90deg) translate(50%, -50%);
Expand Down
7 changes: 3 additions & 4 deletions src/pages/Swap/Swap.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import './Swap.less';

import { FormInstance } from 'antd';
import { useForm } from 'antd/es/form/Form';
import React, { useEffect } from 'react';

import {
Expand All @@ -14,9 +12,10 @@ import {
} from '../../components/common/TokenControl/TokenControl';
import { FormPageWrapper } from '../../components/FormPageWrapper/FormPageWrapper';
import {
Box,
Button,
Flex,
Form,
FormInstance,
HistoryOutlined,
SettingOutlined,
SwapOutlined,
Expand Down Expand Up @@ -63,7 +62,7 @@ class SwapStrategy implements ActionFormStrategy {
}

export const Swap = () => {
const [form] = useForm<SwapFormModel>();
const [form] = Form.useForm<SwapFormModel>();
const swapStrategy = new SwapStrategy();

const swapTokens = () => {
Expand Down
2 changes: 0 additions & 2 deletions src/utils/string.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { instance } from '@storybook/node-logger';

const DOT_SYMBOL = '.';

export const truncate = (id: string): string => {
Expand Down

0 comments on commit 73502f8

Please sign in to comment.