From 56758999537ca0790837f446984379eebca3a44d Mon Sep 17 00:00:00 2001 From: Larvan2 <78135608+Larvan2@users.noreply.github.com> Date: Sat, 18 Apr 2026 14:07:20 +0800 Subject: chore: modify chart --- src/components/shared/ThemeSwitcher.tsx | 150 ++++++++++++++++---------------- 1 file changed, 74 insertions(+), 76 deletions(-) (limited to 'src/components/shared/ThemeSwitcher.tsx') diff --git a/src/components/shared/ThemeSwitcher.tsx b/src/components/shared/ThemeSwitcher.tsx index 363d422..dfe248d 100644 --- a/src/components/shared/ThemeSwitcher.tsx +++ b/src/components/shared/ThemeSwitcher.tsx @@ -3,7 +3,7 @@ import * as React from 'react'; import { useTranslation } from 'react-i18next'; import { connect } from '~/components/StateProvider'; -import { framerMotionResouce } from '~/misc/motion'; +import { LazyMotion, domAnimation, m } from 'framer-motion'; import { getTheme, switchTheme } from '~/store/app'; import { State } from '~/store/types'; @@ -28,7 +28,7 @@ export function ThemeSwitcherImpl({ theme, dispatch }) { const onChange = React.useCallback( (e: React.ChangeEvent) => dispatch(switchTheme(e.target.value)), - [dispatch] + [dispatch], ); return ( @@ -46,91 +46,89 @@ export function ThemeSwitcherImpl({ theme, dispatch }) { } function MoonA() { - const module = framerMotionResouce.read(); - const motion = module.motion; return ( - - - + + + + + ); } function Sun() { - const module = framerMotionResouce.read(); - const motion = module.motion; - return ( - - - - - - - - - - - - - + + + + + + + + + + + + + + + ); } function Auto() { - const module = framerMotionResouce.read(); - const motion = module.motion; - return ( - - - - - - - + + + + + + + + + ); } -- cgit v1.3.1