From 56da15ce32d515bd6a203804fd00270ccdda9c99 Mon Sep 17 00:00:00 2001 From: Tristan Yang Date: Thu, 14 Nov 2024 23:53:17 +0800 Subject: [PATCH] chore: update2 --- src/components/Color.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/Color.jsx b/src/components/Color.jsx index b0e29c6..c411af3 100644 --- a/src/components/Color.jsx +++ b/src/components/Color.jsx @@ -1,6 +1,6 @@ import React, { useEffect, useRef } from 'react'; import styled from 'styled-components'; -import scrollIntoView from 'scroll-into-view-if-needed'; +import scrollIntoView from 'smooth-scroll-into-view-if-needed'; import { getCorrectTextColor } from '../utils'; import CirclePercent from './CirclePercent'; @@ -118,7 +118,7 @@ const Color = ({ CMYK, RGB, intro, - currColorRGB + currColorRGB, }) => { const [r, g, b] = RGB; const [c, m, y, k] = CMYK; @@ -129,7 +129,7 @@ const Color = ({ scrollIntoView(colorEle.current, { behavior: 'smooth', block: 'center', - scrollMode: 'if-needed' + scrollMode: 'if-needed', }); } }, [isCurr]);