+ {data &&
+ data.map((size, index) => {
+ return (
+
setPickedSize(size)}
+ className={`${styles.size} ${pickedSize === size ? styles.sizeActive : null}`}
+ >
+ {size}
+
+ );
+ })}
+
+ );
+};
diff --git a/src/pages/Productpage/components/sizes/sizes.module.scss b/src/pages/Productpage/components/sizes/sizes.module.scss
new file mode 100644
index 0000000..349717d
--- /dev/null
+++ b/src/pages/Productpage/components/sizes/sizes.module.scss
@@ -0,0 +1,30 @@
+.wrapper {
+ width: 100%;
+ overflow-x: auto;
+ &::-webkit-scrollbar {
+ display: none;
+ }
+
+ display: flex;
+ align-items: center;
+ gap: 6px;
+ padding-inline: 10px;
+ margin-top: 10px;
+}
+
+
+.size {
+ padding: 10px 12px;
+ height: 40px;
+ border-radius: 10px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ font-family: 'H_neue';
+ border: 1px solid #f2f2f2;
+ cursor: pointer;
+
+ &Active {
+ border: 1px solid #333333;
+ }
+}
diff --git a/src/pages/Productpage/productpage.module.scss b/src/pages/Productpage/productpage.module.scss
new file mode 100644
index 0000000..973946f
--- /dev/null
+++ b/src/pages/Productpage/productpage.module.scss
@@ -0,0 +1,278 @@
+.wrapper {
+ max-width: 100vw;
+ padding-bottom: 170px;
+ overflow: hidden;
+}
+
+.swiper {
+ position: relative;
+}
+
+.swiperSlide {
+ aspect-ratio: 1;
+ width: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ img {
+ object-fit: cover;
+ object-position: center;
+ width: 100%;
+ }
+
+ video {
+ object-fit: cover;
+ width: 100%;
+ height: 100%;
+ }
+}
+
+.delInfo {
+ margin-top: 4px;
+ display: flex;
+ align-items: center;
+ column-gap: 6px;
+
+ font-size: 14px;
+ line-height: 10px;
+}
+
+.form {
+ padding-bottom: 110px;
+ &Info {
+ background-color: #fff;
+ border-radius: 12px;
+ overflow: hidden;
+ margin-top: 10px;
+
+ .orderDetail {
+ height: 46px;
+ display: flex;
+ padding-left: 16px;
+ column-gap: 16px;
+ align-items: center;
+
+ input {
+ pointer-events: none;
+ outline: none;
+ border: none;
+ width: 100%;
+ height: 100%;
+ border-radius: 0;
+ font-size: 17px;
+ }
+
+ .orderCentralInput {
+ border-top: 1px solid rgba(0, 0, 0, 0.15);
+ border-bottom: 1px solid rgba(0, 0, 0, 0.15);
+ }
+
+ .orderDetailIcon {
+ width: 28px;
+ height: 28px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ }
+ }
+ }
+
+ &Subtitle {
+ color: rgba(112, 117, 121, 1);
+ text-transform: uppercase;
+ font-size: 13px;
+ margin-top: 10px;
+ padding-inline: 16px;
+ }
+
+ .inputs {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ row-gap: 4px;
+ margin-top: 10px;
+ }
+
+ .inputBlock {
+ width: 100%;
+ background-color: #fff;
+ height: 48px;
+ display: flex;
+ align-items: center;
+ gap: 5px;
+ border-radius: 12px;
+ padding-inline: 16px;
+
+ span {
+ width: fit-content;
+ white-space: nowrap;
+ font-size: 17px;
+ color: rgb(126, 127, 128);
+ }
+
+ input {
+ font-size: 17px;
+ border: none;
+ color: rgba(162, 172, 176, 1);
+ width: 100%;
+ font-weight: 400;
+ outline: none;
+ color: black;
+
+ &::placeholder {
+ color: rgba(162, 172, 176, 1);
+ font-size: 17px;
+ }
+ }
+ }
+
+ .attention {
+ font-size: 13px;
+ line-height: 16px;
+ color: rgba(112, 117, 121, 1);
+ margin-top: 16px;
+ padding-inline: 16px;
+ }
+}
+
+.details {
+ .correct {
+ font-size: 13px;
+ line-height: 16px;
+ font-weight: 400;
+ padding-inline: 16px;
+ margin-top: 8px;
+ color: rgba(112, 117, 121, 1);
+ }
+
+ .amount {
+ margin-top: 10px;
+ background-color: #fff;
+ border-radius: 12px;
+ height: 66px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 20px;
+ column-gap: 16px;
+
+ .inputRange {
+ width: 100%;
+ height: 6px;
+ border-radius: 8px;
+
+ &::-webkit-slider-thumb {
+ border-radius: 100px;
+ appearance: none;
+ -webkit-appearance: none;
+ width: 24px;
+ height: 24px;
+ background-color: #ffffff;
+ box-shadow: -2px 2px 10px 2px rgba(0, 0, 0, 0.1);
+ }
+
+ &::-webkit-slider-runnable-track {
+ appearance: none;
+ -webkit-appearance: none;
+ fill: rgba(0, 122, 255, 1);
+ }
+
+ &::-moz-range-thumb {
+ border-radius: 100px;
+ appearance: none;
+ width: 24px;
+ height: 24px;
+ background-color: #ffffff;
+ box-shadow: -2px 2px 10px 2px rgba(0, 0, 0, 0.1);
+ }
+
+ &::-moz-range-track {
+ appearance: none;
+ fill: rgba(0, 122, 255, 1);
+ }
+ }
+
+ .amountInput {
+ outline: none;
+ border: none;
+ width: 40px;
+ height: 26px;
+ font-size: 17px;
+ line-height: 22px;
+ }
+ }
+}
+
+.deliveryFee {
+ margin-top: 10px;
+ background-color: #fff;
+ border-radius: 12px;
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ padding: 11px 20px;
+ column-gap: 16px;
+
+ h4 {
+ font-size: 15px;
+ line-height: 20px;
+ font-weight: 400;
+ }
+
+ .delete {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+ background-color: rgba(229, 57, 53, 1);
+ color: white;
+ border-radius: 100px;
+ font-size: 14px;
+ font-weight: 600;
+ line-height: 17px;
+ column-gap: 6px;
+
+ padding: 8px 11px;
+ margin-top: 11px;
+ }
+
+ .fee {
+ font-size: 24px;
+ line-height: 20px;
+ }
+}
+
+.leftside {
+ p {
+ &:nth-child(1) {
+ font-weight: 600;
+ font-size: 17px;
+ line-height: 22px;
+ }
+
+ &:nth-child(2) {
+ font-size: 15px;
+ line-height: 20px;
+ color: rgba(112, 117, 121, 1);
+ }
+ }
+}
+
+.rightside {
+ display: flex;
+ align-items: center;
+ column-gap: 16px;
+
+ p {
+ font-weight: 700;
+ font-size: 30px;
+ line-height: 22px;
+ }
+}
+
+.banana {
+ width: 128px;
+ aspect-ratio: 1;
+ margin: 0 auto;
+ margin-top: 13px;
+}
diff --git a/src/pages/Profile/Profile.jsx b/src/pages/Profile/Profile.jsx
new file mode 100644
index 0000000..ee76f1f
--- /dev/null
+++ b/src/pages/Profile/Profile.jsx
@@ -0,0 +1,153 @@
+import { useEffect, useState } from 'react';
+import { Nav } from '../../components/Nav/Nav';
+import styles from './profile.module.scss';
+import { useDispatch, useSelector } from 'react-redux';
+import { sub, vector, recipientIcon } from '../../components/icons'
+
+import { Link, useNavigate } from 'react-router-dom';
+import { api_server } from '../../main';
+import axios from 'axios';
+import { pickAddress, pickRecipient } from '../../redux/slice/userSlice';
+
+import {Avatar} from './components/Avatar/Avatar'
+import {Specials} from './components/Specials/Specials'
+import { TonConnectButton } from '@tonconnect/ui-react';
+
+function Profile() {
+ const dispatch = useDispatch();
+ const navigate = useNavigate();
+ const user = useSelector((state) => state.user);
+ const [orders, setOrders] = useState(null);
+
+ useEffect(() => {
+ axios.post(`${api_server}/api/get-my-orders`, { orders: user.orders }).then((res) => {
+ const cart = [];
+ res.data.map((a) => {
+ a.cart.map((item) => (item.date = a.date));
+ cart.push(...a.cart);
+ });
+ setOrders(cart);
+ });
+ }, [user.orders]);
+
+ return (
+
+
+
+
+ {/*
*/}
+ {/*
*/}
+
+ {user.appLanguage === 'ru' ? 'Мои адреса' : 'My addresses'}
+
+ {user.savedAddresses.length > 0 ? (
+
+ {user.savedAddresses.map((address) => {
+ return (
+
+ {sub()}
+
{
+ dispatch(pickAddress(address));
+ navigate('/payment');
+ }}
+ >
+
{address.name}
+
{user.appLanguage == 'ru' ? 'Выбрать' : 'Pick'}
+
+
+
+
+ );
+ })}
+
+ ) : (
+
{user.appLanguage === 'ru' ? 'Нет сохраненных адресов' : 'No saved addresses'}
+ )}
+
+ {user.appLanguage === 'ru' ? 'Сохранить новый адрес' : 'Add new address'}
+
+
+
+ {user.appLanguage === 'ru' ? 'Сохранённые получатели' : 'Saved recipients'}
+
+ {user.savedRecipients?.length > 0 ? (
+
+ {user.savedRecipients.map((recipient) => {
+ return (
+
+ {recipientIcon()}
+
{
+ dispatch(pickRecipient(recipient));
+ navigate('/payment');
+ }}
+ >
+
{recipient.name}
+
{user.appLanguage == 'ru' ? 'Выбрать' : 'Pick'}
+
+
+
+
+ );
+ })}
+
+ ) : (
+
{user.appLanguage === 'ru' ? 'Нет сохраненных получателей' : 'No saved recipients'}
+ )}
+
+ {user.appLanguage === 'ru' ? 'Сохранить нового получателя' : 'Add new recipient'}
+
+
+
+
{user.appLanguage === 'ru' ? 'История покупок' : 'history'}
+
+ {
+ orders?.length === 0 &&
{user.appLanguage === 'ru' ? 'У вас еще нет заказов' : "You don't have any order history yet"}
+ }
+
+
+ {orders &&
+ orders.map((orderItem, index) => {
+ const mydate = new Date(orderItem.date);
+ // prettier-ignore
+ const months = user.appLanguage == 'ru' ? ['Января','Февраля','Марта','Апреля','Мая','Июня','Июля','Августа','Сентября','Октября','Ноября','Декабря',] : ['January','February','March','April','May','June','Jule','August','September','October','November','December',];
+ const date = `${mydate.getDate()} ${months[mydate.getMonth()]} ${mydate.getFullYear()} ${
+ user.appLanguage === 'ru' ? 'г.' : 'year'
+ }`;
+ return (
+
+
+
+
+
+
+
+
{date}
+
{orderItem.name}
+
- {(orderItem.price * orderItem.counter).toFixed(2)} TON
+
+
+
+
+
+ {orderItem.cashback || '0'} TON
+
{user.appLanguage === 'ru' ? 'Кэшбек' : 'Cashback'}
+
+
+ );
+ })}
+
+
+
+ );
+}
+
+export default Profile;
\ No newline at end of file
diff --git a/src/pages/Profile/components/Avatar/Avatar.tsx b/src/pages/Profile/components/Avatar/Avatar.tsx
new file mode 100644
index 0000000..0fe18a9
--- /dev/null
+++ b/src/pages/Profile/components/Avatar/Avatar.tsx
@@ -0,0 +1,28 @@
+import React from 'react'
+import styles from './avatar.module.scss'
+
+export const Avatar: React.FC = () => {
+ return (
+