Skip to content

Commit

Permalink
fix: base css, crm staking loading size
Browse files Browse the repository at this point in the history
  • Loading branch information
DaveVodrazka committed Sep 2, 2024
1 parent dbb6221 commit 037603a
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 29 deletions.
5 changes: 1 addition & 4 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@
content="Buy and sell crypto options with Carmine Options AMM" />
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Condensed:wght@400;500;600;700&display=swap"
rel="stylesheet" />
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700&display=swap" />
<link href="https://fonts.cdnfonts.com/css/formula-condensed" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" />
<link rel="apple-touch-icon" href="%PUBLIC_URL%/favicon.png" />
<link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans+Condensed:wght@400;500;600;700&display=swap"
rel="stylesheet">
<link href="https://fonts.cdnfonts.com/css/formula-condensed" rel="stylesheet">
<!--GTAG_PLACEHOLDER-->
</head>

Expand Down
4 changes: 3 additions & 1 deletion src/components/Airdrop/AirdropModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,9 @@ export const AirdropModal = ({ account, data, open, setOpen }: Props) => {
onClick={handleClaim}
className={stateToClassName(claimState)}
>
{claimState === TransactionState.Processing && <LoadingAnimation />}
{claimState === TransactionState.Processing && (
<LoadingAnimation size={20} />
)}
{claimState === TransactionState.Initial && "Claim"}
{claimState === TransactionState.Success && "Done!"}
{claimState === TransactionState.Fail && "Failed"}
Expand Down
6 changes: 3 additions & 3 deletions src/components/CarmineStaking/StakeCRM.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export const StakeCrm = ({ account, carmBalance }: Props) => {
className={stateToClassName(monthState)}
>
{monthState === TransactionState.Processing && (
<LoadingAnimation />
<LoadingAnimation size={20} />
)}
{monthState === TransactionState.Initial && "1 month"}
{monthState === TransactionState.Success && "Done!"}
Expand All @@ -180,7 +180,7 @@ export const StakeCrm = ({ account, carmBalance }: Props) => {
className={stateToClassName(sixMonthsState)}
>
{sixMonthsState === TransactionState.Processing && (
<LoadingAnimation />
<LoadingAnimation size={20} />
)}
{sixMonthsState === TransactionState.Initial && "6 months"}
{sixMonthsState === TransactionState.Success && "Done!"}
Expand All @@ -194,7 +194,7 @@ export const StakeCrm = ({ account, carmBalance }: Props) => {
className={stateToClassName(yearState)}
>
{yearState === TransactionState.Processing && (
<LoadingAnimation />
<LoadingAnimation size={20} />
)}
{yearState === TransactionState.Initial && "1 year"}
{yearState === TransactionState.Success && "Done!"}
Expand Down
11 changes: 9 additions & 2 deletions src/components/CarmineStaking/Staking.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { QueryKeys } from "../../queries/keys";
import { fetchStakingData } from "./calls";
import { StakeCrm } from "./StakeCRM";
import { LoadingAnimation } from "../Loading/Loading";
import { formatNumber } from "../../utils/utils";

export const StakeWithAccount = ({
account,
Expand All @@ -28,8 +29,14 @@ export const StakeWithAccount = ({
}

const { veCarmBalance, carmBalance, stakes } = data;
const humanReadableVeCarmBalance = shortInteger(veCarmBalance, 18);
const humanReadableCarmBalance = shortInteger(carmBalance, 18);
const humanReadableVeCarmBalance = formatNumber(
shortInteger(veCarmBalance, 18),
4
);
const humanReadableCarmBalance = formatNumber(
shortInteger(carmBalance, 18),
4
);

return (
<div>
Expand Down
8 changes: 4 additions & 4 deletions src/components/CarmineStaking/StakingModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export const StakingModal = ({ account, amount, open, setOpen }: Props) => {
className={stateToClassName(monthState)}
>
{monthState === TransactionState.Processing && (
<LoadingAnimation />
<LoadingAnimation size={20} />
)}
{monthState === TransactionState.Initial && "1 month"}
{monthState === TransactionState.Success && "Done!"}
Expand All @@ -230,7 +230,7 @@ export const StakingModal = ({ account, amount, open, setOpen }: Props) => {
className={stateToClassName(sixMonthsState)}
>
{sixMonthsState === TransactionState.Processing && (
<LoadingAnimation />
<LoadingAnimation size={20} />
)}
{sixMonthsState === TransactionState.Initial && "6 months"}
{sixMonthsState === TransactionState.Success && "Done!"}
Expand All @@ -244,7 +244,7 @@ export const StakingModal = ({ account, amount, open, setOpen }: Props) => {
className={stateToClassName(yearState)}
>
{yearState === TransactionState.Processing && (
<LoadingAnimation />
<LoadingAnimation size={20} />
)}
{yearState === TransactionState.Initial && "1 year"}
{yearState === TransactionState.Success && "Done!"}
Expand All @@ -263,7 +263,7 @@ export const StakingModal = ({ account, amount, open, setOpen }: Props) => {
className={stateToClassName(unstakeState)}
>
{unstakeState === TransactionState.Processing && (
<LoadingAnimation />
<LoadingAnimation size={20} />
)}
{unstakeState === TransactionState.Initial && "Unstake"}
{unstakeState === TransactionState.Success && "Done!"}
Expand Down
8 changes: 4 additions & 4 deletions src/components/CarmineStaking/UnstakeModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export const UnstakeModal = ({ account, stake, open, setOpen }: Props) => {
className={stateToClassName(monthState)}
>
{monthState === TransactionState.Processing && (
<LoadingAnimation />
<LoadingAnimation size={20} />
)}
{monthState === TransactionState.Initial && "1 month"}
{monthState === TransactionState.Success && "Done!"}
Expand All @@ -186,7 +186,7 @@ export const UnstakeModal = ({ account, stake, open, setOpen }: Props) => {
className={stateToClassName(sixMonthsState)}
>
{sixMonthsState === TransactionState.Processing && (
<LoadingAnimation />
<LoadingAnimation size={20} />
)}
{sixMonthsState === TransactionState.Initial && "6 months"}
{sixMonthsState === TransactionState.Success && "Done!"}
Expand All @@ -200,7 +200,7 @@ export const UnstakeModal = ({ account, stake, open, setOpen }: Props) => {
className={stateToClassName(yearState)}
>
{yearState === TransactionState.Processing && (
<LoadingAnimation />
<LoadingAnimation size={20} />
)}
{yearState === TransactionState.Initial && "1 year"}
{yearState === TransactionState.Success && "Done!"}
Expand All @@ -219,7 +219,7 @@ export const UnstakeModal = ({ account, stake, open, setOpen }: Props) => {
className={stateToClassName(unstakeState)}
>
{unstakeState === TransactionState.Processing && (
<LoadingAnimation />
<LoadingAnimation size={20} />
)}
{unstakeState === TransactionState.Initial && "Unstake"}
{unstakeState === TransactionState.Success && "Done!"}
Expand Down
2 changes: 1 addition & 1 deletion src/components/CryptoGraph/AlternativeTradingView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function TradingViewWidget() {
"hideSymbolLogo": false,
"scalePosition": "right",
"scaleMode": "Normal",
"fontFamily": "IBM Plex Sans Condensed, sans-serif, -apple-system, BlinkMacSystemFont, Trebuchet MS, Roboto, Ubuntu, sans-serif",
"fontFamily": "IBM Plex Sans Condensed, sans-serif, -apple-system, sans-serif",
"fontSize": "10",
"noTimeScale": false,
"valuesTracking": "1",
Expand Down
2 changes: 1 addition & 1 deletion src/components/Portfolio/MyOptions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ const LiveItem = ({
<div>{formatNumber(option.size, 4)}</div>
<div>
<div className={styles.tokenvalue}>
<TokenBadge size="small" token={option.underlying} />{" "}
{formatNumber(option.value, 3)}
<TokenBadge size="small" token={option.underlying} />
</div>
</div>
<div>${valueUsd}</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Portfolio/MyStake.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ const Item = ({
</div>
<div>{stake.typeAsText}</div>
<div className={styles.tokenvalue}>
<TokenBadge size="small" token={stake.underlying} />{" "}
{formatNumber(stake.value, 3)}
<TokenBadge size="small" token={stake.underlying} />
</div>
<div>${valueUsd === undefined ? "--" : formatNumber(valueUsd, 2)}</div>
<div>
Expand Down
2 changes: 2 additions & 0 deletions src/components/Portfolio/portfolio.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@

.item>div:nth-child(8) {
width: 80px;
text-align: right;
}

.header {
Expand Down Expand Up @@ -117,6 +118,7 @@

.stakeitem>div:nth-child(4) {
width: 140px;
text-align: right;
}

.stakeitem>div:nth-child(5) {
Expand Down
1 change: 0 additions & 1 deletion src/components/TokenBadge/badge.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
font-family: IBM Plex Sans Condensed;
font-weight: 500;
line-height: 18px;
letter-spacing: 0.04em;
font-size: 15px;
margin-bottom: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/components/TradeTable/TradeTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export const TradeTable = () => {
},
".css-1ly9a1d-MuiSelect-select-MuiInputBase-input-MuiOutlinedInput-input":
{ paddingLeft: 0 },
width: "225px",
width: "208px",
}}
>
<MenuItem value={PairKey.STRK_USDC}>
Expand Down
8 changes: 7 additions & 1 deletion src/style/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,15 @@
font-family: IBM Plex Sans Condensed;
}

html, body {
body {
overflow-x: hidden;
width: 100%;
font-family: "IBM Plex Sans Condensed", sans-serif;
font-size: 18px;
}

p {
font-size: 18px;
}

ul {
Expand Down
5 changes: 0 additions & 5 deletions src/style/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@ const themeConfig: ThemeOptions = {
},
divider: "#a9aaac",
},
typography: {
fontFamily: '"IBM Plex Sans Condensed", sans-serif',
fontSize: 18,
fontWeightRegular: 500,
},
};

export const theme = createTheme(themeConfig);

0 comments on commit 037603a

Please sign in to comment.