feat: add profile counters
All checks were successful
Deploy to VPS (dist) / deploy (push) Successful in 1m37s
All checks were successful
Deploy to VPS (dist) / deploy (push) Successful in 1m37s
This commit is contained in:
@@ -50,8 +50,79 @@
|
|||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.level {
|
||||||
|
align-self: center;
|
||||||
|
width: 37px;
|
||||||
|
height: 21px;
|
||||||
|
border-radius: 14px;
|
||||||
|
background: #ac6b33;
|
||||||
|
box-shadow:
|
||||||
|
0px 0.5px 0px 0px #ffefd1 inset,
|
||||||
|
0px -0.5px 0px 0px #0000008c inset;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
margin-top: -12px;
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.levelInner {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
border-radius: 40px;
|
||||||
|
background: #000000b3;
|
||||||
|
border-top: 1px solid transparent;
|
||||||
|
box-shadow:
|
||||||
|
0px 4px 2px 0px #00000040 inset,
|
||||||
|
0px -1px 0px 0px #fff3b5 inset;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: white;
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.balances {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
gap: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.balanceRow {
|
||||||
|
width: 124px;
|
||||||
|
height: 22px;
|
||||||
|
border-radius: 17px;
|
||||||
|
background: #00000099;
|
||||||
|
box-shadow:
|
||||||
|
0px -2px 0px 0px #b0703d inset,
|
||||||
|
2px 0px 0px 0px #b0703d inset,
|
||||||
|
-2px 0px 0px 0px #b0703d inset,
|
||||||
|
0px 2px 0px 0px #593313 inset,
|
||||||
|
0px 2px 2px 2px #00000059;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 4px;
|
||||||
|
padding-inline: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.balanceIcon {
|
||||||
|
width: 18px;
|
||||||
|
height: 18px;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.honeyValue {
|
||||||
|
font-family: "BalsamiqSans", sans-serif;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 15px;
|
||||||
|
color: #f7d048;
|
||||||
|
}
|
||||||
|
|
||||||
|
.moneyValue {
|
||||||
|
font-family: "BalsamiqSans", sans-serif;
|
||||||
|
font-weight: 700;
|
||||||
|
font-size: 15px;
|
||||||
|
color: #6cc872;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import { useState } from "react";
|
|
||||||
import classes from "./Profile.module.css";
|
import classes from "./Profile.module.css";
|
||||||
import { motion } from "motion/react";
|
import { motion } from "motion/react";
|
||||||
import { Liftable } from "@components/lift";
|
import { Liftable } from "@components/lift";
|
||||||
import { useTelegramUser } from "@/tg";
|
import { useTelegramUser } from "@/tg";
|
||||||
|
import HoneyIcon from "@components/icons/HoneyIcon";
|
||||||
|
import MoneyIcon from "@components/icons/MoneyIcon";
|
||||||
|
import Counter from "@components/atoms/Counter";
|
||||||
|
|
||||||
export default function Profile() {
|
export default function Profile() {
|
||||||
const user = useTelegramUser();
|
const user = useTelegramUser();
|
||||||
|
|
||||||
const [satue, setSatue] = useState(1);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Liftable always>
|
<Liftable always>
|
||||||
<motion.div
|
<motion.div
|
||||||
@@ -23,14 +23,19 @@ export default function Profile() {
|
|||||||
{user?.photoUrl && <img className={classes.avatarImage} src={user.photoUrl} alt="" />}
|
{user?.photoUrl && <img className={classes.avatarImage} src={user.photoUrl} alt="" />}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div className={classes.level}>
|
||||||
|
<div className={classes.levelInner}>1</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div className={classes.balances}>
|
||||||
{satue}
|
<div className={classes.balanceRow}>
|
||||||
<button onClick={() => setSatue((v) => v + 1)}>+</button>
|
<HoneyIcon className={classes.balanceIcon} />
|
||||||
<button onClick={() => setSatue((v) => v - 1)}>-</button>
|
<Counter className={classes.honeyValue} value={129891} />
|
||||||
|
</div>
|
||||||
<div />
|
<div className={classes.balanceRow}>
|
||||||
<div />
|
<MoneyIcon className={classes.balanceIcon} />
|
||||||
|
<Counter className={classes.moneyValue} value={1781} />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</Liftable>
|
</Liftable>
|
||||||
|
|||||||
Reference in New Issue
Block a user