This commit is contained in:
jejolare 2025-07-01 19:04:53 +07:00
parent 4e45757a30
commit c26200e29c
18 changed files with 247 additions and 252 deletions

View file

@ -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;

View file

@ -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"

View file

@ -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} />

View file

@ -36,7 +36,7 @@ interface WalletState {
balance: string;
assets: Asset[];
transactions: Transaction[];
connected: boolean
connected: boolean;
}
type UserState = GetUserResData | null;

View file

@ -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,

View file

@ -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';

View file

@ -68,7 +68,7 @@ function InputPanelItem(props: InputPanelItemProps) {
totalValid,
totalUsd,
scrollToOrderList,
updateUserOrders
updateUserOrders,
} = props;
const [creatingState, setCreatingState] = useState(false);

View file

@ -1172,7 +1172,7 @@ function Trading() {
totalValid,
totalUsd,
scrollToOrderList,
updateUserOrders
updateUserOrders,
})}
</div>
<div className={styles.trading__chart__wrapper}>

View file

@ -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) {

View file

@ -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}

View file

@ -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>

View file

@ -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,

View file

@ -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 ||