fix: use m.button instead of motion.button in ScrollToTop

This commit is contained in:
2026-06-01 20:47:57 -05:00
parent d2f1768294
commit d4d2ac1a51

View File

@@ -1,7 +1,7 @@
"use client"; "use client";
import { useEffect, useState } from "react"; import { useEffect, useState } from "react";
import { motion } from "motion/react"; import { m } from "motion/react";
export function ScrollToTop() { export function ScrollToTop() {
const [visible, setVisible] = useState(false); const [visible, setVisible] = useState(false);
@@ -14,7 +14,7 @@ export function ScrollToTop() {
}, []); }, []);
return ( return (
<motion.button <m.button
type="button" type="button"
onClick={() => window.scrollTo({ top: 0, behavior: "smooth" })} onClick={() => window.scrollTo({ top: 0, behavior: "smooth" })}
whileHover={{ scale: 1.1 }} whileHover={{ scale: 1.1 }}
@@ -23,6 +23,6 @@ export function ScrollToTop() {
aria-label="Scroll to top" aria-label="Scroll to top"
> >
<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><polyline points="18 15 12 9 6 15"/></svg> <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"><polyline points="18 15 12 9 6 15"/></svg>
</motion.button> </m.button>
); );
} }