From eda347666af1391962143e9287579b3dc67a611e Mon Sep 17 00:00:00 2001
From: "deepsource-autofix[bot]"
<62050782+deepsource-autofix[bot]@users.noreply.github.com>
Date: Tue, 10 Dec 2024 02:33:45 +0000
Subject: [PATCH] style: format code with Prettier and StandardJS
This commit fixes the style issues introduced in 514ba13 according to the output
from Prettier and StandardJS.
Details: None
---
src/components/stateless/ShiCode/index.jsx | 23 ++++---
src/pages/home/index.jsx | 80 +++++++++++++++-------
2 files changed, 69 insertions(+), 34 deletions(-)
diff --git a/src/components/stateless/ShiCode/index.jsx b/src/components/stateless/ShiCode/index.jsx
index f2698ea2..82523693 100644
--- a/src/components/stateless/ShiCode/index.jsx
+++ b/src/components/stateless/ShiCode/index.jsx
@@ -2,33 +2,36 @@ import React from 'react'
import { codeToHtml } from 'shiki'
import { Highlight, themes } from 'prism-react-renderer'
import useCopyToClipboard from '@hooks/useCopyToClipboard'
-import {
- CopyOutlined,
- CheckCircleTwoTone
-} from '@ant-design/icons';
+import { CopyOutlined, CheckCircleTwoTone } from '@ant-design/icons'
import styles from './index.module.less'
const ShiCode = ({ preCode }) => {
const [copyToClipboard, copyResult] = useCopyToClipboard()
const handleClickCopy = () => {
- copyToClipboard(preCode);
+ copyToClipboard(preCode)
}
return (
-
Untitled
+
+ Untitled
+
- {copyResult?.state === 'success' ? : }
+ {copyResult?.state === 'success' ? (
+
+ ) : (
+
+ )}
diff --git a/src/pages/home/index.jsx b/src/pages/home/index.jsx
index f98c0c5a..0fbb41ba 100644
--- a/src/pages/home/index.jsx
+++ b/src/pages/home/index.jsx
@@ -6,9 +6,9 @@ import CountUp from 'react-countup'
// import { PinInput } from 'react-input-pin-code'
import SpotlightCard from '@stateless/Spotlight'
import Typewriter from 'typewriter-effect'
-import Marquee from "react-fast-marquee"
-import Masonry, { ResponsiveMasonry } from "react-responsive-masonry"
-import useDetectScroll, { Direction } from "@smakss/react-scroll-direction"
+import Marquee from 'react-fast-marquee'
+import Masonry, { ResponsiveMasonry } from 'react-responsive-masonry'
+import useDetectScroll, { Direction } from '@smakss/react-scroll-direction'
import FixTabPanel from '@stateless/FixTabPanel'
import TypedText from '@stateless/TypedText'
import ReMarkdown from '@stateless/ReMarkdown'
@@ -185,7 +185,7 @@ const Home = () => {
-
+
@@ -203,13 +203,11 @@ const Home = () => {
*/}
-
- React Animate On Scroll.
-
+ React Animate On Scroll.
-
+
@@ -268,24 +266,36 @@ const Home = () => {
-
+
- width: {parseInt(barRect?.width)} height: {parseInt(barRect?.height)} top: {parseInt(barRect?.top)} bottom: {parseInt(barRect?.bottom)} right: {parseInt(barRect?.right)} left: {parseInt(barRect?.left)}
+ width: {parseInt(barRect?.width)} height: {parseInt(barRect?.height)} top: {parseInt(barRect?.top)} bottom:{' '}
+ {parseInt(barRect?.bottom)} right: {parseInt(barRect?.right)} left: {parseInt(barRect?.left)}
+
@@ -300,17 +310,17 @@ const Home = () => {
mask
-
-