lint
This commit is contained in:
parent
4e45757a30
commit
c26200e29c
18 changed files with 247 additions and 252 deletions
|
|
@ -27,11 +27,10 @@ const nextConfig = {
|
|||
return [
|
||||
{
|
||||
source: '/api/:path*',
|
||||
destination: `${process.env.API_URL}/api/:path*`
|
||||
}
|
||||
]
|
||||
destination: `${process.env.API_URL}/api/:path*`,
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
"build": "next build",
|
||||
"start": "next start -p 30289",
|
||||
"lint": "next lint",
|
||||
"lint:fix": "eslint . --fix",
|
||||
"format": "prettier --write .",
|
||||
"format:check": "prettier --check .",
|
||||
"prepare": "husky"
|
||||
|
|
|
|||
|
|
@ -37,10 +37,7 @@ function NavBar(props: NavBarProps) {
|
|||
}
|
||||
|
||||
return (
|
||||
<Link
|
||||
href={href}
|
||||
className={linkClass}
|
||||
>
|
||||
<Link href={href} className={linkClass}>
|
||||
<Img />
|
||||
<h6>{title}</h6>
|
||||
<NotificationIndicator count={notifications} />
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ interface WalletState {
|
|||
balance: string;
|
||||
assets: Asset[];
|
||||
transactions: Transaction[];
|
||||
connected: boolean
|
||||
connected: boolean;
|
||||
}
|
||||
|
||||
type UserState = GetUserResData | null;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ const AdminPanel: React.FC = () => {
|
|||
if (response.data.success) {
|
||||
const fetchedAdmins = response.data.data;
|
||||
setAdmins(
|
||||
fetchedAdmins.map((admin: {alias: string, isOwner: boolean, id: string}) => ({
|
||||
fetchedAdmins.map((admin: { alias: string; isOwner: boolean; id: string }) => ({
|
||||
alias: admin.alias,
|
||||
isOwner: admin.isOwner,
|
||||
key: admin.id,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import { ReactComponent as DeleteIcon } from '@/assets/images/UI/delete.svg';
|
|||
import { ReactComponent as NoOffersIcon } from '@/assets/images/UI/no_offers.svg';
|
||||
import EmptyLink from '@/components/UI/EmptyLink/EmptyLink';
|
||||
import { notationToString, toStandardDateString } from '@/utils/utils';
|
||||
import { cancelOrder, getUserOrders, } from '@/utils/methods';
|
||||
import { cancelOrder, getUserOrders } from '@/utils/methods';
|
||||
import OrdersTableProps from '@/interfaces/props/pages/dex/orders/OrdersTable/OrdersTableProps';
|
||||
import { UserOrderData } from '@/interfaces/responses/orders/GetUserOrdersRes';
|
||||
import Decimal from 'decimal.js';
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ function InputPanelItem(props: InputPanelItemProps) {
|
|||
totalValid,
|
||||
totalUsd,
|
||||
scrollToOrderList,
|
||||
updateUserOrders
|
||||
updateUserOrders,
|
||||
} = props;
|
||||
|
||||
const [creatingState, setCreatingState] = useState(false);
|
||||
|
|
|
|||
|
|
@ -1172,7 +1172,7 @@ function Trading() {
|
|||
totalValid,
|
||||
totalUsd,
|
||||
scrollToOrderList,
|
||||
updateUserOrders
|
||||
updateUserOrders,
|
||||
})}
|
||||
</div>
|
||||
<div className={styles.trading__chart__wrapper}>
|
||||
|
|
|
|||
|
|
@ -66,10 +66,7 @@ function Pagination(props: PaginationProps) {
|
|||
|
||||
result.push(generateButton(i, i === props.value, hiding));
|
||||
}
|
||||
result.push(
|
||||
<p key={nanoid(16)}>...</p>,
|
||||
generateButton(props.totalPages, false)
|
||||
);
|
||||
result.push(<p key={nanoid(16)}>...</p>, generateButton(props.totalPages, false));
|
||||
} else if (props.value >= props.totalPages - 2) {
|
||||
result.push(generateButton(1, false), <p key={nanoid(16)}>...</p>);
|
||||
for (let i = props.totalPages - 4; i <= props.totalPages; i += 1) {
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ function Messenger(props: MessengerProps) {
|
|||
<div className={styles.messenger__panel + (messageLoading ? ' disabled' : '')}>
|
||||
<Input
|
||||
disabled={!!finishState}
|
||||
onKeyDown={e => e.keyCode === 13 && createMessage()}
|
||||
onKeyDown={(e) => e.keyCode === 13 && createMessage()}
|
||||
value={msgInputState}
|
||||
onInput={(e) => setMsgInputState(e.target.value)}
|
||||
bordered={true}
|
||||
|
|
|
|||
|
|
@ -112,7 +112,8 @@ function ProfileTable(props: ProfileTableProps) {
|
|||
<td>
|
||||
<EmptyLink className={styles.profile__header__mobile}>Price</EmptyLink>
|
||||
<p className={styles.profile__row__price}>
|
||||
<span>{params.offerData.price}</span> {params.offerData.target_currency?.name}
|
||||
<span>{params.offerData.price}</span>{' '}
|
||||
{params.offerData.target_currency?.name}
|
||||
</p>
|
||||
</td>
|
||||
<td>
|
||||
|
|
|
|||
|
|
@ -54,7 +54,8 @@ function Profile() {
|
|||
function getFilterFunction(code: 'chats' | 'active' | 'finished') {
|
||||
if (code === 'finished') {
|
||||
return (e: UserChatData) => e.status === 'finished';
|
||||
} if (code === 'active') {
|
||||
}
|
||||
if (code === 'active') {
|
||||
return (e: UserChatData) =>
|
||||
e.status !== 'finished' &&
|
||||
((e.owner_deposit && e.owner_deposit !== 'default') ||
|
||||
|
|
@ -63,10 +64,8 @@ function Profile() {
|
|||
return (e: UserChatData) =>
|
||||
(e.owner_deposit === null || e.owner_deposit === 'default') &&
|
||||
(e.opponent_deposit === null || e.opponent_deposit === 'default');
|
||||
|
||||
}
|
||||
|
||||
|
||||
const [notificationsAmount, setNotificationsAmount] = useState({
|
||||
chats: 0,
|
||||
active: 0,
|
||||
|
|
|
|||
|
|
@ -53,7 +53,8 @@ export const canvasResize = (inputCanvas: HTMLCanvasElement) => {
|
|||
const devicePixelRatio = window.devicePixelRatio || 1;
|
||||
|
||||
const backingStorePixel =
|
||||
(ctx as unknown as { webkitBackingStorePixelRatio?: number })?.webkitBackingStorePixelRatio ||
|
||||
(ctx as unknown as { webkitBackingStorePixelRatio?: number })
|
||||
?.webkitBackingStorePixelRatio ||
|
||||
(ctx as unknown as { mozBackingStorePixelRatio?: number })?.mozBackingStorePixelRatio ||
|
||||
(ctx as unknown as { msBackingStorePixelRatio?: number })?.msBackingStorePixelRatio ||
|
||||
(ctx as unknown as { oBackingStorePixelRatio?: number })?.oBackingStorePixelRatio ||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue