From 790cafac5e0aac62028a0438ab6a92e840066717 Mon Sep 17 00:00:00 2001 From: Ignacio Date: Fri, 10 Nov 2023 19:50:51 +0800 Subject: [PATCH] chore: apply eslint rules and upgrade node version --- .eslintrc.json => .eslintrc.cjs | 131 ++++---- .prettierrc | 5 +- Dockerfile | 7 +- ecosystem.config.js | 2 +- postcss.config.js | 2 +- server/index.ts | 4 +- src/components/Carousel/index.tsx | 160 +++++---- .../CustomInputAutocomplete/index.tsx | 14 +- src/components/Intro_panel/index.tsx | 19 +- src/components/arrow/index.tsx | 18 +- src/components/cardSwiper/index.tsx | 28 +- src/components/contact-form/index.tsx | 54 +-- src/components/cta-button/index.tsx | 18 +- .../footer/components/footer_items/index.tsx | 22 +- .../components/footer_items/useStyles.ts | 14 +- .../footer/components/social_media/index.tsx | 30 +- src/components/footer/index.tsx | 10 +- src/components/formInput/index.tsx | 30 +- src/components/four-table/index.tsx | 14 +- src/components/guide_nav/index.tsx | 2 +- src/components/header-card/index.tsx | 4 +- src/components/icons/Akash/index.tsx | 106 +++--- src/components/icons/Instagram/index.tsx | 38 +-- src/components/icons/discord/index.tsx | 30 +- src/components/icons/facebook/index.tsx | 30 +- src/components/icons/forbole/index.tsx | 86 +++-- src/components/icons/github/index.tsx | 32 +- src/components/icons/linkedIn/index.tsx | 24 +- src/components/icons/medium/index.tsx | 28 +- src/components/icons/menu/index.tsx | 34 +- src/components/icons/telegram/index.tsx | 32 +- src/components/icons/twitter/index.tsx | 24 +- src/components/intro_card/index.tsx | 14 +- .../stats/components/stats_card/useStyles.ts | 14 +- .../key_data/components/stats/index.tsx | 4 +- src/components/layout/index.tsx | 40 +-- src/components/layout_val/index.tsx | 36 +- src/components/markdown/index.tsx | 4 +- .../components/company_menu_button/index.tsx | 34 +- .../nav/components/desktop_nav_menu/index.tsx | 80 +++-- .../nav/components/lang_menu_button/index.tsx | 60 ++-- .../components/lang_menu_button/useStyles.ts | 8 +- .../nav/components/mobile_nav_menu/index.tsx | 76 ++--- .../components/products_menu_button/index.tsx | 36 +- .../components/stakenow_menu_button/index.tsx | 32 +- src/components/nav/index.tsx | 24 +- src/components/product-panel/index.tsx | 18 +- src/components/scroll_logo/Card.tsx | 8 +- src/components/scroll_logo/config.ts | 4 +- src/components/scroll_to_bottom/index.tsx | 24 +- src/components/scroll_to_top/index.tsx | 18 +- src/components/section/index.tsx | 6 +- src/components/selection-tab/index.tsx | 20 +- src/components/signature-card/index.tsx | 10 +- src/components/success-modal/index.tsx | 30 +- src/components/tags/index.tsx | 10 +- src/components/tags/styles.tsx | 10 +- src/components/talk-modal/index.tsx | 154 +++++---- src/components/theme_mode_button/index.tsx | 18 +- src/pages/_document.tsx | 10 +- src/pages/author/[author]/index.tsx | 4 +- src/pages/blog/[title]/index.tsx | 4 +- src/pages/blog/index.tsx | 4 +- src/pages/privacy-policy.tsx | 4 +- src/pages/staking/[title]/index.tsx | 6 +- src/pages/tag/[tag]/index.tsx | 4 +- src/pages/terms-and-conditions.tsx | 4 +- src/screens/Infrastructure/index.tsx | 50 +-- src/screens/about/index.tsx | 64 ++-- src/screens/analytics_tools/index.tsx | 18 +- src/screens/app/index.tsx | 8 +- src/screens/app/innerApp/index.tsx | 2 +- .../author_posts/components/post/index.tsx | 59 ++-- .../author/components/author_posts/index.tsx | 2 +- src/screens/author/index.tsx | 24 +- .../blog_posts/components/post/index.tsx | 59 ++-- .../blog/components/blog_posts/index.tsx | 12 +- .../blog/components/title_posts/index.tsx | 4 +- .../blog/components/title_posts/styles.tsx | 6 +- src/screens/blog/components/twitter/index.tsx | 18 +- src/screens/blog/index.tsx | 6 +- .../blog_details/components/author/index.tsx | 8 +- .../components/social_media/index.tsx | 4 +- src/screens/blog_details/index.tsx | 28 +- src/screens/contact/index.tsx | 142 ++++---- src/screens/developer_tools/hooks.tsx | 32 +- src/screens/developer_tools/index.tsx | 46 +-- src/screens/enterprise_solution/index.tsx | 32 +- src/screens/home/index.tsx | 82 +++-- .../guide/components/guide_details/index.tsx | 4 +- .../network_guides/components/guide/index.tsx | 26 +- .../components/info_card/useStyles.ts | 14 +- .../components/network_info/index.tsx | 41 ++- src/screens/network_guides/index.tsx | 8 +- src/screens/policy/index.tsx | 16 +- src/screens/products/index.tsx | 312 +++++++++--------- .../components/calculator/index.tsx | 160 ++++----- .../components/calculator/styles.tsx | 37 ++- .../components/calculate_rewards/config.ts | 4 +- .../components/calculate_rewards/index.tsx | 20 +- .../components/calculate_rewards/utils.ts | 37 +-- .../components/contact_card/index.tsx | 64 ++-- .../components/contact_forbole/index.tsx | 16 +- .../components/faq/components/card/index.tsx | 32 +- src/screens/staking/components/faq/index.tsx | 36 +- .../stats/components/stats_card/useStyles.ts | 14 +- .../hero/components/stats/index.tsx | 2 +- src/screens/staking/components/hero/index.tsx | 8 +- .../components/how_to_card/index.tsx | 22 +- .../staking/components/how_it_works/index.tsx | 16 +- .../components/network_card/index.tsx | 32 +- .../components/network_card/useStyles.ts | 119 +++---- .../components/network_grid/config.ts | 4 +- .../components/network_grid/index.tsx | 20 +- .../networks/components/search_bar/index.tsx | 30 +- .../components/search_bar/useStyles.ts | 48 +-- .../staking/components/networks/index.tsx | 16 +- .../staking/components/why_forbole/index.tsx | 40 +-- src/screens/staking/index.tsx | 4 +- src/screens/staking_service/index.tsx | 24 +- .../tag_posts/components/post/index.tsx | 59 ++-- .../tag/components/tag_posts/index.tsx | 2 +- src/screens/tag/index.tsx | 4 +- src/screens/terms_and_conditions/index.tsx | 19 +- src/styles/theme/index.ts | 2 +- src/utils/merge_state_change.ts | 5 +- src/utils/network_functions.ts | 15 +- src/utils/network_info.ts | 140 ++++---- src/utils/remove_internal_tags.ts | 5 +- 129 files changed, 1989 insertions(+), 2078 deletions(-) rename .eslintrc.json => .eslintrc.cjs (50%) diff --git a/.eslintrc.json b/.eslintrc.cjs similarity index 50% rename from .eslintrc.json rename to .eslintrc.cjs index c98c6def..d9fdc2eb 100644 --- a/.eslintrc.json +++ b/.eslintrc.cjs @@ -1,86 +1,97 @@ -{ - "env": { - "browser": true, - "es2021": true +module.exports = { + env: { + browser: true, + es2021: true, }, - "extends": ["plugin:react/recommended", "airbnb", "prettier"], - "parser": "@typescript-eslint/parser", - "parserOptions": { - "ecmaFeatures": { - "jsx": true + extends: ["plugin:react/recommended", "airbnb", "prettier"], + parser: "@typescript-eslint/parser", + parserOptions: { + ecmaFeatures: { + jsx: true, }, - "ecmaVersion": "latest", - "sourceType": "module" + ecmaVersion: "latest", + sourceType: "module", }, - "plugins": ["react", "@typescript-eslint", "prettier"], - "rules": { + plugins: ["react", "@typescript-eslint", "prettier"], + rules: { + "arrow-body-style": "error", + "camelcase": "off", + "global-require": "off", "max-len": "error", - "import/no-extraneous-dependencies": "off", - "import/no-dynamic-require": "error", - "@typescript-eslint/no-var-requires": "off", - "@typescript-eslint/no-shadow": "error", "no-shadow": "off", + "no-unused-vars": "off", + "object-shorthand": "error", + "prefer-const": "error", + "quote-props": ["error", "consistent-as-needed"], + + "@typescript-eslint/no-shadow": "error", + "@typescript-eslint/no-unused-vars": "error", + "@typescript-eslint/no-var-requires": "off", + + "jsx-a11y/alt-text": "off", "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", + "jsx-a11y/interactive-supports-focus": "off", + "jsx-a11y/no-static-element-interactions": "off", + "import/extensions": [ "error", "ignorePackages", { - "js": "never", - "jsx": "never", - "ts": "never", - "tsx": "never" - } + js: "never", + jsx: "never", + ts: "never", + tsx: "never", + }, ], + "import/no-absolute-path": "off", + "import/no-dynamic-require": "error", + "import/no-extraneous-dependencies": "off", "import/no-unresolved": "off", - "arrow-body-style": "off", - "jsx-a11y/no-static-element-interactions": "off", - "react/jsx-props-no-spreading": "off", - "react/react-in-jsx-scope": "off", - "react/jsx-one-expression-per-line": "off", - "jsx-a11y/alt-text": "off", - "react/no-unescaped-entities": "off", - "react/require-default-props": "off", - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": "error", + "import/prefer-default-export": "off", - "react/no-array-index-key": "off", - "import/no-absolute-path": "off", - "global-require": "off", "react/jsx-filename-extension": [ 2, { - "extensions": [".js", ".jsx", ".ts", ".tsx"] - } + extensions: [".js", ".jsx", ".ts", ".tsx"], + }, ], - "react/function-component-definition": "off" + + "prefer-template": "error", + "react/function-component-definition": "off", + "react/jsx-boolean-value": "error", + "react/jsx-one-expression-per-line": "off", + "react/jsx-props-no-spreading": "off", + "react/jsx-sort-props": "error", + "react/no-array-index-key": "off", + "react/no-unescaped-entities": "off", + "react/no-unknown-property": "off", + "react/react-in-jsx-scope": "off", + "react/require-default-props": "off", + "react/self-closing-comp": "error", }, - "overrides": [ + overrides: [ { - "files": ["tests/**/*"], - "rules": { - "no-undef": "off" - } + files: ["tests/**/*"], + rules: { + "no-undef": "off", + }, }, { - "files": ["src/**/*.test.tsx", "src/**/*.test.ts", "**/*.spec.ts"], - "rules": { + files: ["src/**/*.test.tsx", "src/**/*.test.ts", "**/*.spec.ts"], + rules: { "no-undef": "off", - "import/no-extraneous-dependencies": "off" - } - } + "import/no-extraneous-dependencies": "off", + }, + }, ], - "settings": { + settings: { "import/resolver": { - "typescript": {}, // this loads /tsconfig.json to eslint - "node": { - "extensions": [".js", ".jsx", ".ts", ".tsx"] - } - } - } -} + typescript: {}, // this loads /tsconfig.json to eslint + node: { + extensions: [".js", ".jsx", ".ts", ".tsx"], + }, + }, + }, +}; diff --git a/.prettierrc b/.prettierrc index e29376df..f5c62087 100644 --- a/.prettierrc +++ b/.prettierrc @@ -1,6 +1,7 @@ { - "plugins": ["@trivago/prettier-plugin-sort-imports"], "importOrder": ["^~(.*)$", "^[./]"], "importOrderSeparation": true, - "importOrderSortSpecifiers": true + "importOrderSortSpecifiers": true, + "plugins": ["@trivago/prettier-plugin-sort-imports"], + "quoteProps": "consistent" } diff --git a/Dockerfile b/Dockerfile index 845dee54..d7ef49f6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,7 @@ -FROM node:14.15.0-alpine +FROM node:20-alpine ENV PORT 3000 -# Install git for ui and internal packages -RUN apk add --no-cache git - # Set app directory WORKDIR /app @@ -49,4 +46,4 @@ RUN npm run build EXPOSE ${PORT} # Running the app -CMD ["pm2-runtime", "dist/index.js"] \ No newline at end of file +CMD ["pm2-runtime", "dist/index.js"] diff --git a/ecosystem.config.js b/ecosystem.config.js index f305fbd9..fb2a3ce1 100644 --- a/ecosystem.config.js +++ b/ecosystem.config.js @@ -5,7 +5,7 @@ module.exports = { script: "dist/index.js", watch: true, env: { - "NODE_ENV": "production", + NODE_ENV: "production", } } ] diff --git a/postcss.config.js b/postcss.config.js index 25fc0af2..8c5923dd 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -1,5 +1,5 @@ module.exports = { - "plugins": [ + plugins: [ 'autoprefixer' ] } \ No newline at end of file diff --git a/server/index.ts b/server/index.ts index 25ae1f43..c78550fa 100644 --- a/server/index.ts +++ b/server/index.ts @@ -222,9 +222,7 @@ const ghostAdminApi = new GhostAdminAPI({ }, ); - server.all("*", (req: Request, res: Response) => { - return handle(req, res); - }); + server.all("*", (req: Request, res: Response) => handle(req, res)); server.listen(port, (err?: any) => { if (err) throw err; diff --git a/src/components/Carousel/index.tsx b/src/components/Carousel/index.tsx index 300e0e35..4905bc0a 100644 --- a/src/components/Carousel/index.tsx +++ b/src/components/Carousel/index.tsx @@ -19,83 +19,81 @@ type PersonInfo = { img: string; }; -const PersonCard = ({ desc, name, position, img }: PersonInfo) => { - return ( - - {img && ( - - )} - - {/* 姓名 */} - - {name} - +const PersonCard = ({ desc, name, position, img }: PersonInfo) => ( + + {img && ( + + )} + + {/* 姓名 */} + + {name} + - {/* 职位 */} - - {position} - - - {/* 描述 */} + {/* 职位 */} - {desc} + {position} - - ); -}; + + {/* 描述 */} + + {desc} + + +); type CarouselProps = { personList?: PersonInfo[]; }; @@ -138,15 +136,6 @@ const Carousel = ({ personList }: CarouselProps) => { }} > { initialSlide: 1, }, }} + centeredSlides + className="swiper-no-swiping" + initialSlide={1} + navigation={{ + nextEl: ".c-next", + prevEl: ".c-prev", + }} + slidesPerView={3} + spaceBetween={-16} > {usedList?.map((item, index) => ( ))} diff --git a/src/components/CustomInputAutocomplete/index.tsx b/src/components/CustomInputAutocomplete/index.tsx index 1f31a7e8..0b80cf9b 100644 --- a/src/components/CustomInputAutocomplete/index.tsx +++ b/src/components/CustomInputAutocomplete/index.tsx @@ -15,19 +15,16 @@ export default function CustomInputAutocomplete({ const theme = useTheme(); return ( ( )} + sx={{ + display: "block", + }} /> ); } diff --git a/src/components/Intro_panel/index.tsx b/src/components/Intro_panel/index.tsx index 80602767..d8e61559 100644 --- a/src/components/Intro_panel/index.tsx +++ b/src/components/Intro_panel/index.tsx @@ -1,7 +1,6 @@ import { Stack, Typography, useMediaQuery, useTheme } from "@mui/material"; import Box from "@mui/material/Box"; import Image, { StaticImageData } from "next/image"; -import React from "react"; import CtaButton from "../cta-button"; @@ -28,22 +27,22 @@ const IntroPanel = (props: Props) => { const matches = useMediaQuery(theme.breakpoints.down(500)); return ( { {btnName && ( {btnName} @@ -85,10 +84,8 @@ const IntroPanel = (props: Props) => { { > {imageHref && ( )} diff --git a/src/components/arrow/index.tsx b/src/components/arrow/index.tsx index f5f4dd1d..64a73e20 100644 --- a/src/components/arrow/index.tsx +++ b/src/components/arrow/index.tsx @@ -39,28 +39,28 @@ export default function Arraw({ className, sx, direction }: Props) { return ( diff --git a/src/components/cardSwiper/index.tsx b/src/components/cardSwiper/index.tsx index 15464bc3..95bbe48b 100644 --- a/src/components/cardSwiper/index.tsx +++ b/src/components/cardSwiper/index.tsx @@ -19,18 +19,6 @@ const CardSwiper = ({ imagesList, style }: Props) => { { initialSlide: 1, }, }} + centeredSlides + className="scale" + initialSlide={1} + navigation={{ + nextEl: ".c-next", // 下一个箭头的类名或DOM元素 + prevEl: ".c-prev", // 上一个箭头的类名或DOM元素 + }} + slidesPerView={3} + spaceBetween={-80} + style={{ + ...style, + }} > {imagesList.map((item, index) => ( - + { }, }} > - {item && } + {item && } ))} diff --git a/src/components/contact-form/index.tsx b/src/components/contact-form/index.tsx index 24bbf709..2f784c3c 100644 --- a/src/components/contact-form/index.tsx +++ b/src/components/contact-form/index.tsx @@ -30,9 +30,9 @@ const MenuProps = { PaperProps: { style: {}, sx: { - backgroundColor: "white", - borderRadius: "8px", - boxShadow: "4px 8px 24px 0px rgba(116, 81, 255, 0.28)", + "backgroundColor": "white", + "borderRadius": "8px", + "boxShadow": "4px 8px 24px 0px rgba(116, 81, 255, 0.28)", "& li:hover": { backgroundColor: "rgba(107, 97, 254, 0.24)", }, @@ -67,8 +67,8 @@ const ContactFrom = forwardRef( return ( ( }} > ( * @@ -118,10 +118,10 @@ const ContactFrom = forwardRef( {t("your_company")} @@ -135,10 +135,10 @@ const ContactFrom = forwardRef( * @@ -155,11 +155,20 @@ const ContactFrom = forwardRef( - + {t("subscribe-us")} diff --git a/src/components/footer/index.tsx b/src/components/footer/index.tsx index 627b56bd..b83ccf29 100644 --- a/src/components/footer/index.tsx +++ b/src/components/footer/index.tsx @@ -36,8 +36,8 @@ const Footer = ({ red, itemColor }: FooterProps) => { > {red && ( { justifyContent: "flex-end", }} > - + { > {isMobile ? ( Picture of the author ) : ( Picture of the author )} @@ -112,8 +112,8 @@ const Footer = ({ red, itemColor }: FooterProps) => { }} > ({ - display: "block", - boxShadow: "4px 8px 24px 0px rgba(116, 81, 255, 0.28)", - borderRadius: "8px", + "display": "block", + "boxShadow": "4px 8px 24px 0px rgba(116, 81, 255, 0.28)", + "borderRadius": "8px", "& .MuiInputBase-input:placeholder": { color: "#878787", }, "& .MuiInputBase-input": { - display: "block", - width: "calc( 100% - 36px)", - marginTop: theme.spacing(2), - position: "relative", - backgroundColor: theme.palette.mode === "light" ? "#FFF" : "#1A2027", - border: "2px solid", - borderColor: theme.palette.mode === "light" ? "#fff" : "#2D3843", - borderRadius: "8px", - fontSize: "16px", - padding: "12px 16px", - transition: theme.transitions.create([ + "display": "block", + "width": "calc( 100% - 36px)", + "marginTop": theme.spacing(2), + "position": "relative", + "backgroundColor": theme.palette.mode === "light" ? "#FFF" : "#1A2027", + "border": "2px solid", + "borderColor": theme.palette.mode === "light" ? "#fff" : "#2D3843", + "borderRadius": "8px", + "fontSize": "16px", + "padding": "12px 16px", + "transition": theme.transitions.create([ "border-color", "background-color", "box-shadow", ]), // Use the system font instead of the default Roboto font. - fontFamily: [ + "fontFamily": [ "-apple-system", "BlinkMacSystemFont", '"Segoe UI"', diff --git a/src/components/four-table/index.tsx b/src/components/four-table/index.tsx index f20eadec..56b6be7c 100644 --- a/src/components/four-table/index.tsx +++ b/src/components/four-table/index.tsx @@ -53,10 +53,10 @@ const FourTable = ({ btnHref }: Props) => { }} > - + {t("popular")} { }} > { }} > { )} router.push(Plan.btnHref) : btnHref} sx={{ position: "absolute", left: "24px", @@ -180,7 +181,6 @@ const FourTable = ({ btnHref }: Props) => { bottom: "24px", [theme.breakpoints.down("laptop")]: { display: "none" }, }} - onClick={Plan.btnHref ? () => router.push(Plan.btnHref) : btnHref} > {t(Plan.btnName)} diff --git a/src/components/guide_nav/index.tsx b/src/components/guide_nav/index.tsx index 00c2f214..8152518d 100644 --- a/src/components/guide_nav/index.tsx +++ b/src/components/guide_nav/index.tsx @@ -103,7 +103,6 @@ const GuideNav = ({ staking }: GuideNavProps) => { diff --git a/src/components/header-card/index.tsx b/src/components/header-card/index.tsx index 37f0c539..ebfeb447 100644 --- a/src/components/header-card/index.tsx +++ b/src/components/header-card/index.tsx @@ -112,11 +112,11 @@ export default function HeaderCard({ > {head_bg && ( )} diff --git a/src/components/icons/Akash/index.tsx b/src/components/icons/Akash/index.tsx index 50d7b476..f0624ceb 100644 --- a/src/components/icons/Akash/index.tsx +++ b/src/components/icons/Akash/index.tsx @@ -1,65 +1,63 @@ import React from "react"; -const Akash = () => { - return ( - ( + + - - - - - - - - + + + + + + + - - - - - - - ); -}; + + + + + + + +); export default Akash; diff --git a/src/components/icons/Instagram/index.tsx b/src/components/icons/Instagram/index.tsx index 8cc1641a..4408b3e6 100644 --- a/src/components/icons/Instagram/index.tsx +++ b/src/components/icons/Instagram/index.tsx @@ -1,22 +1,20 @@ -const Instagram = ({ fill = "currentColor" }: { fill?: string }) => { - return ( - - - - - - ); -}; +const Instagram = ({ fill = "currentColor" }: { fill?: string }) => ( + + + + + +); export default Instagram; diff --git a/src/components/icons/discord/index.tsx b/src/components/icons/discord/index.tsx index a18be9b0..b002d954 100644 --- a/src/components/icons/discord/index.tsx +++ b/src/components/icons/discord/index.tsx @@ -1,20 +1,18 @@ import React from "react"; -const Discord = () => { - return ( - - - - ); -}; +const Discord = () => ( + + + +); export default Discord; diff --git a/src/components/icons/facebook/index.tsx b/src/components/icons/facebook/index.tsx index a5ae6fe8..c3b61fdc 100644 --- a/src/components/icons/facebook/index.tsx +++ b/src/components/icons/facebook/index.tsx @@ -1,20 +1,18 @@ import React from "react"; -const Facebook = () => { - return ( - - - - ); -}; +const Facebook = () => ( + + + +); export default Facebook; diff --git a/src/components/icons/forbole/index.tsx b/src/components/icons/forbole/index.tsx index 877a9ca5..69a0ea81 100644 --- a/src/components/icons/forbole/index.tsx +++ b/src/components/icons/forbole/index.tsx @@ -1,48 +1,46 @@ import React from "react"; -const Forbole = ({ color, height = "30", width = "158" }: any) => { - return ( - - - - - - - - - - - ); -}; +const Forbole = ({ color, height = "30", width = "158" }: any) => ( + + + + + + + + + + +); export default Forbole; diff --git a/src/components/icons/github/index.tsx b/src/components/icons/github/index.tsx index 9d8a66d2..bb5f2bfc 100644 --- a/src/components/icons/github/index.tsx +++ b/src/components/icons/github/index.tsx @@ -1,19 +1,17 @@ -const Github = ({ fill = "currentColor" }: { fill?: string }) => { - return ( - - - - ); -}; +const Github = ({ fill = "currentColor" }: { fill?: string }) => ( + + + +); export default Github; diff --git a/src/components/icons/linkedIn/index.tsx b/src/components/icons/linkedIn/index.tsx index 0b9b7505..1faf11a7 100644 --- a/src/components/icons/linkedIn/index.tsx +++ b/src/components/icons/linkedIn/index.tsx @@ -1,15 +1,13 @@ -const LinkedIn = ({ fill = "currentColor" }: { fill?: string }) => { - return ( - - - - ); -}; +const LinkedIn = ({ fill = "currentColor" }: { fill?: string }) => ( + + + +); export default LinkedIn; diff --git a/src/components/icons/medium/index.tsx b/src/components/icons/medium/index.tsx index 7ef8ed24..f86140bf 100644 --- a/src/components/icons/medium/index.tsx +++ b/src/components/icons/medium/index.tsx @@ -1,17 +1,15 @@ -const Medium = ({ fill = "currentColor" }: { fill?: string }) => { - return ( - - - - - - ); -}; +const Medium = ({ fill = "currentColor" }: { fill?: string }) => ( + + + + + +); export default Medium; diff --git a/src/components/icons/menu/index.tsx b/src/components/icons/menu/index.tsx index f4b7db65..e2886b2e 100644 --- a/src/components/icons/menu/index.tsx +++ b/src/components/icons/menu/index.tsx @@ -1,21 +1,19 @@ import React from "react"; -const Menu = ({ color }: any) => { - return ( - - - - ); -}; +const Menu = ({ color }: any) => ( + + + +); export default Menu; diff --git a/src/components/icons/telegram/index.tsx b/src/components/icons/telegram/index.tsx index 8b296a27..5cee2185 100644 --- a/src/components/icons/telegram/index.tsx +++ b/src/components/icons/telegram/index.tsx @@ -1,19 +1,17 @@ -const Telegram = ({ fill = "currentColor" }: { fill?: string }) => { - return ( - - - - ); -}; +const Telegram = ({ fill = "currentColor" }: { fill?: string }) => ( + + + +); export default Telegram; diff --git a/src/components/icons/twitter/index.tsx b/src/components/icons/twitter/index.tsx index 032c5869..69886d76 100644 --- a/src/components/icons/twitter/index.tsx +++ b/src/components/icons/twitter/index.tsx @@ -1,15 +1,13 @@ -const Twitter = ({ fill = "currentColor" }: { fill?: string }) => { - return ( - - - - ); -}; +const Twitter = ({ fill = "currentColor" }: { fill?: string }) => ( + + + +); export default Twitter; diff --git a/src/components/intro_card/index.tsx b/src/components/intro_card/index.tsx index ffe6e9e7..ee77ed99 100644 --- a/src/components/intro_card/index.tsx +++ b/src/components/intro_card/index.tsx @@ -38,7 +38,7 @@ const IntroCard = (props: Props) => { "0px 10px 32px -4px rgba(96, 60, 238, 0.10), 0px 6px 14px -6px rgba(96, 60, 238, 0.28)", }} > - {imageHref && } + {imageHref && } { { flex: "0 0 auto", }, }} - px="10px" > {item} diff --git a/src/components/key_data/components/stats/components/stats_card/useStyles.ts b/src/components/key_data/components/stats/components/stats_card/useStyles.ts index dbc8155f..3fc4abdc 100644 --- a/src/components/key_data/components/stats/components/stats_card/useStyles.ts +++ b/src/components/key_data/components/stats/components/stats_card/useStyles.ts @@ -4,14 +4,14 @@ const useStyles = () => { const theme = useTheme(); return { root: css({ - display: "flex", - flexDirection: "column", - alignItems: "center", - padding: theme.spacing(4, 3), - background: theme.palette.common.white, - boxShadow: + "display": "flex", + "flexDirection": "column", + "alignItems": "center", + "padding": theme.spacing(4, 3), + "background": theme.palette.common.white, + "boxShadow": "0px 6px 14px -6px rgba(2, 38, 225, 0.12), 0px 10px 32px -4px rgba(2, 38, 225, 0.1)", - borderRadius: theme.spacing(3), + "borderRadius": theme.spacing(3), "& .MuiTypography-h3": { paddingTop: theme.spacing(2), fontWeight: 700, diff --git a/src/components/key_data/components/stats/index.tsx b/src/components/key_data/components/stats/index.tsx index c411c95f..6f4cf6cd 100644 --- a/src/components/key_data/components/stats/index.tsx +++ b/src/components/key_data/components/stats/index.tsx @@ -16,9 +16,9 @@ const Stats = () => { const statsItem = stats[key]; return ( ); })} diff --git a/src/components/layout/index.tsx b/src/components/layout/index.tsx index 98de8227..f8169739 100644 --- a/src/components/layout/index.tsx +++ b/src/components/layout/index.tsx @@ -109,65 +109,65 @@ const Layout = ({ {title} {!!(url === "https://staging.forbole.com") && ( - + )} - - + + - - + + - +