13 lines
297 B
TypeScript
13 lines
297 B
TypeScript
import { useEffect, useState } from "react";
|
|
|
|
export function useCardAnimation() {
|
|
const [mounted, setMounted] = useState(false);
|
|
const isMobile = typeof window !== "undefined" && window.innerWidth < 768;
|
|
|
|
useEffect(() => {
|
|
setMounted(true);
|
|
}, []);
|
|
|
|
return { mounted, isMobile };
|
|
}
|