Skip to content

Commit

Permalink
chore: cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
icfor committed Nov 10, 2023
1 parent f8e62a9 commit c2e7d24
Show file tree
Hide file tree
Showing 20 changed files with 9 additions and 173 deletions.
2 changes: 2 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
"jsx-a11y/anchor-is-valid": "off",
"jsx-a11y/click-events-have-key-events": "off",
"jsx-a11y/interactive-supports-focus": "off",
"jsx-a11y/control-has-associated-label": "off",
"react/no-unknown-property": "off",
"camelcase": "off",
"import/prefer-default-export": "off",
"import/extensions": [
Expand Down
3 changes: 0 additions & 3 deletions src/components/arrow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ export default function Arraw({ className, sx, direction }: Props) {
"& path": {
stroke: theme.palette.custom.forbole.blue,
},
// "&:hover circle": {
// fill: "rgba(255, 255, 255,.7)",
// },
},
...sx,
}}
Expand Down
1 change: 0 additions & 1 deletion src/components/cardSwiper/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// Import Swiper React components
import { Box, Stack, useTheme } from "@mui/material";
import Image from "next/image";
import { CSSProperties } from "react";
Expand Down
33 changes: 0 additions & 33 deletions src/components/footer/components/footer_items/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Box, Divider, Typography, useTheme } from "@mui/material";
import useTranslation from "next-translate/useTranslation";
import Link from "next/link";
import React from "react";

import { FooterProps } from "../../types";
import useStyles from "./useStyles";
Expand Down Expand Up @@ -36,12 +35,10 @@ const FooterItems = ({ staking }: FooterProps) => {
alignItems: "center",
[theme.breakpoints.down("laptop")]: {
pt: "12px",
// color: theme.palette.custom.forbole.indigo,
gap: "8px",
borderTop: `1px solid ${theme.palette.custom.forbole.grey02}`,
},
[theme.breakpoints.up("laptop")]: {
// color: theme.palette.primary.main,
flexDirection: "row",
"& hr": {
mx: 2,
Expand Down Expand Up @@ -108,10 +105,8 @@ const FooterItems = ({ staking }: FooterProps) => {
alignItems: "center",
[theme.breakpoints.down("laptop")]: {
gap: "12px",
// color: theme.palette.custom.forbole.indigo,
},
[theme.breakpoints.up("laptop")]: {
// color: theme.palette.primary.main,
flexDirection: "row",
alignItems: "center",
paddingTop: 0,
Expand Down Expand Up @@ -149,34 +144,6 @@ const FooterItems = ({ staking }: FooterProps) => {
{t("blog")}
</Typography>
</Link>
{/* <Divider
orientation="vertical"
variant="middle"
flexItem
sx={{
my:'4px',
borderColor: staking
? theme.palette.custom.forbole.indigo
: theme.palette.primary.main,
[theme.breakpoints.down("laptop")]: {
display: "none",
},
}}
/> */}
{/* <Link href="/" > */}
{/* <Typography
fontSize="14px"
sx={{
opacity: "0.3",
"&:hover": {
cursor: "pointer",
color: theme.palette.custom.forbole.purple,
},
}}
>
{t("careers")}
</Typography> */}
{/* </Link> */}
</Box>
</Box>
</Box>
Expand Down
1 change: 0 additions & 1 deletion src/recoil/settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ export {
useSettingsRecoil,
atomState,
writeTheme,
// getThemeTemplate,
readTheme,
navigationId,
};
7 changes: 0 additions & 7 deletions src/recoil/settings/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,3 @@ export const THEME_DICTIONARY = {
light: lightTemplate,
dark: darkTemplate,
};

// export const getThemeTemplate = (theme: keyof Theme) => {
// if (THEME_DICTIONARY[theme]) {
// return THEME_DICTIONARY[theme];
// }
// return lightTemplate;
// };
1 change: 0 additions & 1 deletion src/screens/blog/components/title_posts/styles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const styles: { [index: string]: SxProps<Theme> } = {
textDecoration: "none",
},
[theme.breakpoints.up("laptop")]: {
// padding: 0,
padding: theme.spacing(3.75),
background: "rgba(255, 255, 255, 0.1)",
backdropFilter: "blur(8px)",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export const useNetworkGuidesHook = () => {
? setCosmosNetworkGuides((prev) => ({
...prev,
[data.metric.instance]: [
// ...prev[data.metric.instance],
{
title: "commission",
stats: data.commissionRate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,6 @@ const NetworkInfo = ({ post }: any) => {
sx={{
display: "contents",
textAlign: "center",
// WebkitLineClamp: readMore ? 10 : 5,
WebkitLineClamp: readMore ? "unset" : "inherit",
}}
>
Expand Down
12 changes: 0 additions & 12 deletions src/screens/policy/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,17 +113,6 @@ const Policy = () => {
>
{t("updatedDate")}
</Typography>
{/* <Typography
variant="body1"
sx={{
color: '#000',
fontSize: theme.spacing(1.75),
fontWeight: 600,
paddingBottom: theme.spacing(5),
}}
>
{t('description1', {})}
</Typography> */}
<Trans
i18nKey={t("description1")}
components={[
Expand All @@ -133,7 +122,6 @@ const Policy = () => {
color: "#000",
fontSize: theme.spacing(1.375),
fontWeight: 400,
// paddingBottom: theme.spacing(5),
}}
/>,
<Typography
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,26 @@ export const calculatorKeys = [
"shentu",
"stafihub",
"stride",

// coingecko not updating its market price:
// 'provenance',

// awaiting for back-end data:
// 'sommelier',

"gravity_bridge",
"jackal",
"terra",

// annual rewards not available:
// 'nym',
// 'xpla',

// token price not on Coingecko:
// 'omniflix',
// 'ununifi',
// 'onomy',

"stargaze",
"teritori",
].sort();
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@ export const styles: { [index: string]: SxProps<Theme> } = {
"& .MuiSelect-icon": {
margin: theme.spacing(0.5, 2.5, 0, 0),
},
[theme.breakpoints.up("laptop")]: {
// gridColumn: '1 / span 5',
// gridRow: '2 / span 1',
},
[theme.breakpoints.up("laptop")]: {},
}),
input: (theme) => ({
".MuiOutlinedInput-root": {
Expand Down
5 changes: 0 additions & 5 deletions src/screens/staking/components/calculate_rewards/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,8 @@ const stakingParams: NetworkProps = {
gravity_bridge: baseState,
jackal: baseState,
terra: baseState,
// nym: baseState,
// omniflix: baseState,
stargaze: baseState,
teritori: baseState,
// xpla: baseState,
// ununifi: baseState,
// onomy: baseState
};

export const getStakingParams = (key: string) => {
Expand Down
28 changes: 0 additions & 28 deletions src/screens/staking/components/calculate_rewards/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,34 +110,6 @@ vsys.gecko = "https://api.coingecko.com/api/v3/coins/v-systems";
const emoney: any = R.clone(defaultFunctions(uBandToBand));
emoney.gecko = "https://api.coingecko.com/api/v3/coins/iris-network";

// const iris: any = {
// bonded: (data: any) => {
// return Number(R.pathOr(0, ["bonded_tokens"], data));
// },
// inflation: (data: any) => {
// const [inflationData] = data?.filter(
// (x) => x?.type === "irishub/mint/Params"
// );
// return (
// toFixed(Number(R.pathOr(0, ["value", "inflation"], inflationData))) ?? 0
// );
// },
// supply: (data: any) => {
// const [supply] = R.pathOr([], ["total_supply"], data).filter(
// (x) => x.denom === "iris-atto"
// );
// return uIrisToIris(Number(R.pathOr(0, ["amount"], supply)));
// },
// commissionRate: (data: any) => {
// return Number(R.pathOr(0, ["commission", "rate"], data));
// },
// marketPrice: (data: any) => {
// return toFixed(
// Number(R.pathOr(0, ["market_data", "current_price", "usd"], data))
// );
// },
// };

const iris: any = R.clone(defaultFunctions(uIrisToIris));
iris.gecko = "https://api.coingecko.com/api/v3/coins/iris-network";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ const useStyles = () => {
"0px 8px 22px -6px rgba(2, 38, 225, 0.12), 0px 14px 64px -4px rgba(2, 38, 225, 0.12)",
},
"& .networkbox__explore-btn": {
// ...theme.mixins.button:
padding: "0.75rem 1rem",
borderRadius: "200px",
/* Primary Color/BD Red Gradient 02 */
Expand Down Expand Up @@ -132,12 +131,10 @@ const useStyles = () => {
right: theme.spacing(3),
},
"& .MuiTypography-h3": {
// fontSize: theme.typography.h5.fontSize,
fontSize: theme.spacing(2),
color: theme.palette.custom.forbole.indigo6,
},
"& .MuiTypography-h6, & .MuiTypography-body1": {
// fontSize: theme.typography.body2.fontSize,
fontSize: theme.spacing(2),
color: theme.palette.custom.forbole.indigo6,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,7 @@ export const cosmosNetworkParams: NetworkProps = {
evmos: { bonded: 0, APY: 0, TVL: 0 },
comdex: { bonded: 0, APY: 0, TVL: 0 },
axelar: { bonded: 0, APY: 0, TVL: 0 },
// bitcanna: { bonded: 0, APY: 0, TVL: 0 },
cheqd: { bonded: 0, APY: 0, TVL: 0 },
// chihuahua: { bonded: 0, APY: 0, TVL: 0 },
// terra_classic: { bonded: 0, APY: 0, TVL: 0 },
persistence: { bonded: 0, APY: 0, TVL: 0 },
crescent: { bonded: 0, APY: 0, TVL: 0 },
picasso: { bonded: 0, APY: 0, TVL: 0 },
Expand Down
41 changes: 0 additions & 41 deletions src/styles/globals.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,10 @@ html {
box-sizing: border-box;
}

/* @font-face {
font-family: 'Chinese Font';
src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-regular-webfont.woff");
unicode-range: U+4E00–9FFF;
letter-spacing: 1rem;
} */

body {
font-family: -apple-system, BlinkMacSystemFont, sans-serif;
overflow-x: hidden;
line-height: normal;
/* overflow-y: scroll !important; */
}

* {
Expand All @@ -28,39 +20,6 @@ body {
box-sizing: border-box;
}

/*Carousel组件 */
/* .swiper-slide.scale {
transition: 300ms;
transform: scale(0.8);
height: auto;
}
.swiper-slide-active.scale {
transform: scale(1);
}
.scale>.swiper-wrapper{
align-items: stretch;
}
.c-next.swiper-button-disabled,
.c-prev.swiper-button-disabled {
display: none;
}
.c-next,
.c-prev {
display: none;
}
@media screen and (max-width: 768px) {
.c-next,
.c-prev {
display: block;
}
}
/* .v-next.swiper-button-disabled,
.v-prev.swiper-button-disabled {
display: none;
} */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
Expand Down
4 changes: 0 additions & 4 deletions src/styles/theme/dark.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
import { PaletteMode } from "@mui/material";

// const backgroundDefault = '#252345';
// const backgroundDefault = 'rgba(30, 41, 67, 1)';
// const backgroundDefault = 'url(/images/assets/image_BG.png)';
// const backgroundDefault = 'transaprent';
const backgroundDefault = "#171A4B";

/** Custom theme overrides for dark mode */
Expand Down
24 changes: 0 additions & 24 deletions src/styles/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,11 @@ import { deepmerge } from "@mui/utils";
import { darkThemeOverride } from "./dark";
import { lightThemeOverride } from "./light";

// interface CustomPalette extends Palette {
// background: { default: string };
// }

// export interface CustomTheme extends Theme {
// palette: CustomPalette;
// }

/** Common themes that don't change across light and dark theme */
export const common: ThemeOptions = {
breakpoints: {
keys: ["mobile", "tablet", "laptop", "desktop"],
values: {
// mobile: 320,
mobile: 375,
tablet: 768,
laptop: 1025,
Expand All @@ -43,21 +34,6 @@ export const common: ThemeOptions = {
},
},
},

// components: {
// MuiCssBaseline: {
// styleOverrides: `
// @font-face {
// font-family: chinese font;
// font-style: normal;
// font-weight: 400;
// src: url("https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-regular-webfont.woff");
// unicodeRange: U+4E00–9FFF;
// letter-spacing: 0.2rem;
// }
// `,
// },
// },
};

export const lightTemplate: ThemeOptions = deepmerge(
Expand Down
1 change: 0 additions & 1 deletion src/styles/theme/light.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { PaletteMode } from "@mui/material";

const backgroundDefault = "#FFFFFF";
// const backgroundDefault = 'rgba(30, 41, 67, 1)';

/** Custom theme overrides for dark mode */
export const lightThemeOverride = {
Expand Down

0 comments on commit c2e7d24

Please sign in to comment.